[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 "out 
of
  -// memory", which may or may not be caught. Otherwise the engine will 

[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/ 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
  -rpmjsReportError(JSContext *cx, const char *message, JSErrorReport 

[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);
   
JS::CompileOptions opts(I->cx);
opts.setFileAndLine(filename, lineno);
  @@ -145,6 +202,9 @@
   

[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.cpp22 Jun 2017 17:35:24 

[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 is for Windows only, it is a 

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

2017-06-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-Jun-2017 19:26:25
  Branch: rpm-5_4  Handle: 2017062117262400

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

  Log:
- rpmjs: stub-in mozjsXY example embeddings.

  Summary:
RevisionChanges Path
1.293.2.94  +24 -0  rpm/rpmio/Makefile.am
1.1.2.1 +61 -0  rpm/rpmio/rpmjs24.cpp
1.1.2.1 +68 -0  rpm/rpmio/rpmjs31.cpp
1.1.2.1 +70 -0  rpm/rpmio/rpmjs38.cpp
1.1.2.1 +71 -0  rpm/rpmio/rpmjs45.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.93 -r1.293.2.94 Makefile.am
  --- rpm/rpmio/Makefile.am 20 Jun 2017 02:57:33 -  1.293.2.93
  +++ rpm/rpmio/Makefile.am 21 Jun 2017 17:26:24 -  1.293.2.94
  @@ -18,6 +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 \
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 \
  @@ -31,6 +32,7 @@
   EXTRA_PROGRAMS += bsdiff bspatch fanotify pcrsed rpmborg rpmcurl \
rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \
rpmpbzip2 rpmpigz rpmzstd \
  + 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
  @@ -548,6 +550,28 @@
   rpmgpg_SOURCES = rpmgpg.c
   rpmgpg_LDADD = $(RPMIO_LDADD_COMMON)
   
  +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
  +
  +rpmjs31_SOURCES = rpmjs31.cpp
  +rpmjs31_CPPFLAGS = -include /usr/include/mozjs-31/js/RequiredDefines.h 
-I/usr/include/mozjs-31 -fPIC
  +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_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_LDADD = -L/usr/lib64 -lmozjs-45
  +
  +mozjs:   rpmjs24 rpmjs31 rpmjs38 rpmjs45
  + -./rpmjs24
  + -./rpmjs31
  + -./rpmjs38
  + -./rpmjs45
  +
   rpmpbzip2_SOURCES = rpmpbzip2.c
   rpmpbzip2_LDADD = $(RPMIO_LDADD_COMMON)
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmjs24.cpp
  
  $ cvs diff -u -r0 -r1.1.2.1 rpmjs24.cpp
  --- /dev/null 2017-06-21 19:22:00.0 +0200
  +++ rpmjs24.cpp   2017-06-21 19:26:24.894224457 +0200
  @@ -0,0 +1,61 @@
  +// following code might be needed in some case
  +// #define __STDC_LIMIT_MACROS
  +// #include 
  +#include "jsapi.h"
  +
  +/* The class of the global object. */
  +static JSClass global_class = {
  +"global",
  +JSCLASS_GLOBAL_FLAGS,
  +JS_PropertyStub,
  +JS_DeletePropertyStub,
  +JS_PropertyStub,
  +JS_StrictPropertyStub,
  +JS_EnumerateStub,
  +JS_ResolveStub,
  +JS_ConvertStub,
  +};
  +
  +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 = 

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

2017-06-19 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-Jun-2017 04:57:34
  Branch: rpm-5_4  Handle: 2017062002573300

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   rpmw.c rpmw.h
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am librpmio.vers poptIO.c rpmio.c teio.c

  Log:
- rpmw: create an rpmw "wrapper" object for templating.

  Summary:
RevisionChanges Path
1.293.2.93  +4  -3  rpm/rpmio/Makefile.am
2.199.2.95  +5  -0  rpm/rpmio/librpmio.vers
1.94.2.40   +5  -2  rpm/rpmio/poptIO.c
1.230.2.61  +1  -0  rpm/rpmio/rpmio.c
1.1.2.1 +65 -0  rpm/rpmio/rpmw.c
1.1.2.1 +81 -0  rpm/rpmio/rpmw.h
1.1.2.9 +81 -139rpm/rpmio/teio.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.92 -r1.293.2.93 Makefile.am
  --- rpm/rpmio/Makefile.am 15 Jun 2017 07:16:18 -  1.293.2.92
  +++ rpm/rpmio/Makefile.am 20 Jun 2017 02:57:33 -  1.293.2.93
  @@ -163,10 +163,10 @@
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 \
  - 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 \
  + 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 \
  - rpmtcl.h rpmtpm.h rpmuuid.h rpmxar.h rpmz.h rpmzstd.h rpmzq.h \
  + rpmtcl.h rpmtpm.h rpmuuid.h rpmw.h rpmxar.h rpmz.h rpmzstd.h rpmzq.h \
set.h tar.h ugid.h rpmio-stub.h
   
   usrlibdir = $(libdir)
  @@ -255,6 +255,7 @@
rpmtcl.c \
rpmtpm.c \
rpmuuid.c \
  + rpmw.c \
rpmxar.c \
rpmzlog.c \
rpmzq.c \
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/librpmio.vers
  
  $ cvs diff -u -r2.199.2.94 -r2.199.2.95 librpmio.vers
  --- rpm/rpmio/librpmio.vers   16 Jun 2017 12:30:30 -  2.199.2.94
  +++ rpm/rpmio/librpmio.vers   20 Jun 2017 02:57:33 -  2.199.2.95
  @@ -780,6 +780,7 @@
   _rpmmc_debug;
   _rpmmcI;
   _rpmmcPool;
  +rpmmcNew;
   rpmmeNew;
   _rpmme_debug;
   _rpmmePool;
  @@ -983,6 +984,10 @@
   rpmvtRollback;
   rpmvtSync;
   rpmvtUpdate;
  +_rpmw_debug;
  +_rpmwPool;
  +rpmwDump;
  +rpmwNew;
   rpmxarNew;
   rpmxarNext;
   rpmxarPath;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/poptIO.c
  
  $ cvs diff -u -r1.94.2.39 -r1.94.2.40 poptIO.c
  --- rpm/rpmio/poptIO.c13 Jun 2017 22:25:23 -  1.94.2.39
  +++ rpm/rpmio/poptIO.c20 Jun 2017 02:57:33 -  1.94.2.40
  @@ -70,6 +70,7 @@
   #include 
   extern int _rpmsvn_debug;
   #include 
  +#include 
   
   #include 
   #include 
  @@ -1054,9 +1055,9 @@
{ "rpmcudfdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, 
&_rpmcudf_debug, -1,
N_("Debug embedded CUDF parser"), NULL},
{ "rpmeiodebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, 
&_rpmeio_debug, -1,
  - N_("Debug libev"), NULL},
  + N_("Debug libeio wrappers"), NULL},
{ "rpmevdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmev_debug, 
-1,
  - N_("Debug libev"), NULL},
  + N_("Debug libev wrappers"), NULL},
{ "rpmficldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, 
&_rpmficl_debug, -1,
N_("Debug embedded FICL interpreter"), NULL},
{ "rpmgfsdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, 
&_rpmgfs_debug, -1,
  @@ -1101,6 +1102,8 @@
N_("Debug selinux"), NULL},
{ "rpmtcldebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, 
&_rpmtcl_debug, -1,
N_("Debug embedded TCL interpreter"), NULL},
  + { "rpmwdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmw_debug, -1,
  + N_("Debug wrapper generator"), NULL},
{ "rpmvcdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmvc_debug, 
-1,
N_("Debug embedded SQL virtual cursor"), NULL},
{ "rpmvtdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmvt_debug, 
-1,
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmio.c
  

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

2017-06-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:   15-Jun-2017 09:16:18
  Branch: rpm-5_4  Handle: 2017061507161800

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   teio.c
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am librpmio.vers rpmeio.c rpmeio.h tmq.c

  Log:
- WIP: refactor RV+EIO into its own nest program.

  Summary:
RevisionChanges Path
1.293.2.92  +8  -5  rpm/rpmio/Makefile.am
2.199.2.92  +3  -1  rpm/rpmio/librpmio.vers
1.1.2.2 +514 -8 rpm/rpmio/rpmeio.c
1.1.2.2 +3  -0  rpm/rpmio/rpmeio.h
1.1.2.1 +308 -0 rpm/rpmio/teio.c
1.1.2.23+1  -433rpm/rpmio/tmq.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.91 -r1.293.2.92 Makefile.am
  --- rpm/rpmio/Makefile.am 13 Jun 2017 22:25:23 -  1.293.2.91
  +++ rpm/rpmio/Makefile.am 15 Jun 2017 07:16:18 -  1.293.2.92
  @@ -18,10 +18,10 @@
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 \
  - tdir.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 testit.sh \
  - xxhash.h xxhash.c \
  + 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 \
  + testit.sh xxhash.h xxhash.c \
microjson.c mongoc-counters.defs
   
   EXTRA_PROGRAMS = rpmcpio rpmdpkg rpmtar rpmz
  @@ -31,7 +31,7 @@
   EXTRA_PROGRAMS += bsdiff bspatch fanotify pcrsed rpmborg rpmcurl \
rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \
rpmpbzip2 rpmpigz rpmzstd \
  - tasn tbf tcap tder tdir tfts tget tglob thkp tmagic tmire \
  + 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
   
  @@ -597,6 +597,9 @@
   tdir_SOURCES = tdir.c
   tdir_LDADD = $(RPMIO_LDADD_COMMON)
   
  +teio_SOURCES = teio.c
  +teio_LDADD = $(RPMIO_LDADD_COMMON)
  +
   tfts_SOURCES = tfts.c
   tfts_LDADD = $(RPMIO_LDADD_COMMON)
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/librpmio.vers
  
  $ cvs diff -u -r2.199.2.91 -r2.199.2.92 librpmio.vers
  --- rpm/rpmio/librpmio.vers   13 Jun 2017 22:25:23 -  2.199.2.91
  +++ rpm/rpmio/librpmio.vers   15 Jun 2017 07:16:18 -  2.199.2.92
  @@ -474,14 +474,16 @@
   rpmMCExpand;
   rpmMCExpandNumeric;
   _rpmeio_debug;
  +rpmeioCancel;
   rpmeioDumpREQ;
  +rpmeioLoop;
   rpmeioNew;
   rpmeioReqType;
   rpmeioPipe;
   rpmeioPollWant;
   rpmeioPollDone;
   rpmeioStart;
  -rpmeioLoop;
  +rpmeioSubmit;
   rpmeioCB;
   rpmeioCB_readdir;
   rpmeioCB_stat;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmeio.c
  
  $ cvs diff -u -r1.1.2.1 -r1.1.2.2 rpmeio.c
  --- rpm/rpmio/rpmeio.c13 Jun 2017 22:25:23 -  1.1.2.1
  +++ rpm/rpmio/rpmeio.c15 Jun 2017 07:16:18 -  1.1.2.2
  @@ -13,6 +13,8 @@
   if (_rpmeio_debug || _rpmio_debug) \
fprintf(stderr, _fmt, __VA_ARGS__)
   
  +#define REQ_ERRNO(req)   ((req)->errorno)
  +
   /*==*/
   const char * rpmeioReqType(int reqtype)
   {
  @@ -110,7 +112,7 @@
PRINT(d, errorno);
   #else
if (req->errorno)
  - fprintf(fp, "%25s: %d %s\n", "errorno", req->errorno, 
strerror(req->errorno));
  + fprintf(fp, "%25s: %d %s\n", "errorno", REQ_ERRNO(req), 
strerror(REQ_ERRNO(req)));
   #endif
   
   #ifdef   DYING
  @@ -145,6 +147,48 @@
   }
   
   /*==*/
  +#ifdef   REF
  +static struct ev_loop *loop;
  +static ev_idle repeat_watcher;
  +static ev_async ready_watcher;
  +
  +/* idle watcher callback, only used when eio_poll */
  +/* didn't handle all results in one call */
  +static void
  +repeat (EV_P_ ev_idle *w, int revents)
  +{
  +if (eio_poll () != -1)
  

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am digest.c rpmzstd.c xxhash.c...

2017-06-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-Jun-2017 10:25:52
  Branch: rpm-5_4  Handle: 2017060508255101

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   xxhash.c xxhash.h
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am digest.c rpmzstd.c

  Log:
- zstd: turn on benchmark options (which need xxhash to verify
blocks).

  Summary:
RevisionChanges Path
1.293.2.88  +3  -2  rpm/rpmio/Makefile.am
2.93.2.12   +3  -0  rpm/rpmio/digest.c
1.1.2.7 +71 -59 rpm/rpmio/rpmzstd.c
1.1.2.1 +876 -0 rpm/rpmio/xxhash.c
1.1.2.1 +305 -0 rpm/rpmio/xxhash.h
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.87 -r1.293.2.88 Makefile.am
  --- rpm/rpmio/Makefile.am 3 Jun 2017 17:39:04 -   1.293.2.87
  +++ rpm/rpmio/Makefile.am 5 Jun 2017 08:25:51 -   1.293.2.88
  @@ -14,9 +14,10 @@
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 \
  - tdir.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 \
  + tdir.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 testit.sh \
  + xxhash.h xxhash.c \
microjson.c mongoc-counters.defs
   
   EXTRA_PROGRAMS = rpmcpio rpmdpkg rpmtar rpmz
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/digest.c
  
  $ cvs diff -u -r2.93.2.11 -r2.93.2.12 digest.c
  --- rpm/rpmio/digest.c26 May 2017 20:49:22 -  2.93.2.11
  +++ rpm/rpmio/digest.c5 Jun 2017 08:25:51 -   2.93.2.12
  @@ -121,6 +121,9 @@
   #define  _JLU3_jlu32l
   #include "lookup3.c"
   
  +/* Include Yann Collet XXH hash */
  +#define XXH_NAMESPACE   RPMZSTD_
  +#include "xxhash.c"
   
   /**
* Digest private data.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmzstd.c
  
  $ cvs diff -u -r1.1.2.6 -r1.1.2.7 rpmzstd.c
  --- rpm/rpmio/rpmzstd.c   5 Jun 2017 01:04:42 -   1.1.2.6
  +++ rpm/rpmio/rpmzstd.c   5 Jun 2017 08:25:51 -   1.1.2.7
  @@ -8,10 +8,9 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
   
  -#define ZSTD_NOBENCH 1
   #define ZSTD_NODICT  1
   
  -#undef   POPTIO_OPTIONS  /* XXX NOTYET:  option/arg 
processing. */
  +#undef   POPTIO_OPTIONS  /* XXX NOTYET:  option/arg 
processing. */
   #define  USE_RPMIO
   #define  _FPIO   ""
   
  @@ -41,21 +40,21 @@
   #include 
   #else
   typedef  FILE * FD_t;
  -#define Fopenfopen
  -#define  Fread   fread
  -#define  Fwrite  fwrite
  -#define  Fseek   fseek
  -#define  Fclose  fclose
  -#define  Ferror  ferror
  -#define  Statstat
  -#define  Lstat   lstat
  -#define Unlink   remove
  -#define Chmodchmod
  -#define Chownchown
  -#define  Utime   utime
  -#define  Opendir opendir
  -#define  Readdir readdir
  -#define  Closedir closedir
  +#define Fopen(...)   fopen(__VA_ARGS__)
  +#define  Fread(...)  fread(__VA_ARGS__)
  +#define  Fwrite(...) fwrite(__VA_ARGS__)
  +#define  Fseek(...)  fseek(__VA_ARGS__)
  +#define  Fclose(...) fclose(__VA_ARGS__)
  +#define  Ferror(...) ferror(__VA_ARGS__)
  +#define  Stat(...)   stat(__VA_ARGS__)
  +#define  Lstat(...)  lstat(__VA_ARGS__)
  +#define Unlink(...)  remove(__VA_ARGS__)
  +#define Chmod(...)   chmod(__VA_ARGS__)
  +#define Chown(...)   chown(__VA_ARGS__)
  +#define  Utime(...)  utime(__VA_ARGS__)
  +#define  Opendir(...)opendir(__VA_ARGS__)
  +#define  Readdir (...)   readdir(__VA_ARGS__)
  +#define  Closedir(...)   closedir(__VA_ARGS__)
   #endif
   
   #include 
  @@ -761,7 +760,7 @@
   /* --- ../lib/compress/zstdmt_compress.h */
   
   #if defined (__cplusplus)
  -extern "C" {
  + xtern "C" {
   #endif
   
   
  @@ -2002,6 +2001,10 @@
   
   #ifndef ZSTD_NOBENCH
   
  +/* --- lib/common/xxhash.c */
  +#define  XXH_NAMESPACE   ZSTD_
  +#include "xxhash.c"
  +
   /* 

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am rpmmacro.h tzstd.c zstio.c

2017-06-01 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-Jun-2017 19:39:56
  Branch: rpm-5_4  Handle: 2017060117395600

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   tzstd.c
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am rpmmacro.h zstio.c

  Log:
- zstd: add test program.

  Summary:
RevisionChanges Path
1.293.2.84  +4  -1  rpm/rpmio/Makefile.am
2.56.4.12   +11 -10 rpm/rpmio/rpmmacro.h
1.1.2.1 +649 -0 rpm/rpmio/tzstd.c
1.1.2.2 +40 -28 rpm/rpmio/zstio.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.83 -r1.293.2.84 Makefile.am
  --- rpm/rpmio/Makefile.am 30 May 2017 23:48:23 -  1.293.2.83
  +++ rpm/rpmio/Makefile.am 1 Jun 2017 17:39:56 -   1.293.2.84
  @@ -20,7 +20,7 @@
microjson.c mongoc-counters.defs
   
   EXTRA_PROGRAMS = rpmcpio rpmdpkg rpmtar rpmz
  -EXTRA_PROGRAMS += bdes duk thtml tinv tkey tmacro tmq tpw turg
  +EXTRA_PROGRAMS += bdes duk thtml tinv tkey tmacro tmq tpw turg tzstd
   noinst_PROGRAMS = tjsmn tmqtt
   
   EXTRA_PROGRAMS += bsdiff bspatch fanotify pcrsed rpmborg rpmcurl \
  @@ -679,6 +679,9 @@
   turg_SOURCES = turg.c
   turg_LDADD = $(RPMIO_LDADD_COMMON)
   
  +tzstd_SOURCES = tzstd.c
  +tzstd_LDADD = $(RPMIO_LDADD_COMMON)
  +
   github_SOURCES = tjson.c
   github_CFLAGS = -Wall -Werror -std=gnu99 -O2 -DJSMN_GITHUB
   github_LDADD = -lcurl
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmmacro.h
  
  $ cvs diff -u -r2.56.4.11 -r2.56.4.12 rpmmacro.h
  --- rpm/rpmio/rpmmacro.h  6 Jul 2016 14:25:43 -   2.56.4.11
  +++ rpm/rpmio/rpmmacro.h  1 Jun 2017 17:39:56 -   2.56.4.12
  @@ -180,16 +180,17 @@
   void rpmFreeMacros(MacroContext mc);
   
   typedef enum rpmCompressedMagic_e {
  -COMPRESSED_NOT   = 0,/*!< not compressed */
  -COMPRESSED_OTHER = 1,/*!< gzip can handle */
  -COMPRESSED_BZIP2 = 2,/*!< bzip2 can handle */
  -COMPRESSED_ZIP   = 3,/*!< unzip can handle */
  -COMPRESSED_LZOP  = 4,/*!< lzop can handle */
  -COMPRESSED_LZMA  = 5,/*!< lzma can handle */
  -COMPRESSED_XZ= 6,/*!< xz can handle */
  -COMPRESSED_LRZIP = 7,/*!< lrzip can handle */
  -COMPRESSED_LZIP  = 8,/*!< lzip can handle */
  -COMPRESSED_7ZIP  = 9,/*!< 7zip can handle */
  +COMPRESSED_NOT   =  0,   /*!< not compressed */
  +COMPRESSED_OTHER =  1,   /*!< gzip can handle */
  +COMPRESSED_BZIP2 =  2,   /*!< bzip2 can handle */
  +COMPRESSED_ZIP   =  3,   /*!< unzip can handle */
  +COMPRESSED_LZOP  =  4,   /*!< lzop can handle */
  +COMPRESSED_LZMA  =  5,   /*!< lzma can handle */
  +COMPRESSED_XZ=  6,   /*!< xz can handle */
  +COMPRESSED_LRZIP =  7,   /*!< lrzip can handle */
  +COMPRESSED_LZIP  =  8,   /*!< lzip can handle */
  +COMPRESSED_7ZIP  =  9,   /*!< 7zip can handle */
  +COMPRESSED_ZSTD  = 10,   /*!< 7zip can handle */
   } rpmCompressedMagic;
   
   /**
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/tzstd.c
  
  $ cvs diff -u -r0 -r1.1.2.1 tzstd.c
  --- /dev/null 2017-06-01 19:34:23.0 +0200
  +++ tzstd.c   2017-06-01 19:39:56.447439530 +0200
  @@ -0,0 +1,649 @@
  +/**
  + * Copyright 2016-present, Yann Collet, Facebook, Inc.
  + * All rights reserved.
  + *
  + * This source code is licensed under the license found in the
  + * LICENSE-examples file in the root directory of this source tree.
  + */
  +
  +#include "system.h"
  +
  +#include "rpmio_internal.h"
  +#include 
  +#include 
  +#include 
  +#include 
  +#include 
  +#define PEEK(_bolt)  yarnPeekLock(_bolt)
  +
  +#if defined(WITH_ZSTD)
  +#include // presumes zstd library is installed
  +#endif
  +
  +#include "debug.h"
  +
  +static int _debug;
  +
  +int _rpmzsf_debug = -1;
  +
  +#define SPEW(_fmt, ...) \
  +if ((zsf && ZSF_ISSET(DEBUG)) || _rpmzsf_debug || _rpmio_debug) \
  + fprintf(stderr, _fmt, __VA_ARGS__)
  +
  +#undef   COMPRESSOR
  +
  +typedef  struct rpmzsf_s * rpmzsf;
  +struct rpmzsf_s {
  +struct rpmioItem_s _item;/*!< usage mutex and pool identifier. */
  +const char * path;  

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am zstio.c

2017-05-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:   31-May-2017 01:48:23
  Branch: rpm-5_4  Handle: 2017053023482300

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   zstio.c
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am

  Log:
- zstio: stub in a zstd implementation.

  Summary:
RevisionChanges Path
1.293.2.83  +6  -2  rpm/rpmio/Makefile.am
1.1.2.1 +486 -0 rpm/rpmio/zstio.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.82 -r1.293.2.83 Makefile.am
  --- rpm/rpmio/Makefile.am 28 May 2017 18:39:22 -  1.293.2.82
  +++ rpm/rpmio/Makefile.am 30 May 2017 23:48:23 -  1.293.2.83
  @@ -31,7 +31,7 @@
dumpasn1 lookup3 trel twitter github tmicrojson
   
   #noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
  -EXTRA_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp test 
tcpuid
  +EXTRA_PROGRAMS += aiocat b2sum tset tblake2b tblake2bp tblake2s tblake2sp 
test tcpuid
   noinst_PROGRAMS += tgfs
   if WITH_LIBGIT2
   noinst_PROGRAMS += tgit
  @@ -258,7 +258,8 @@
url.c \
xzdio.c \
yajl.c \
  - yarn.c
  + yarn.c \
  + zstio.c
   
   librpmio_la_LDFLAGS = -no-undefined -release $(LT_CURRENT).$(LT_REVISION)
   if HAVE_LD_VERSION_SCRIPT
  @@ -481,6 +482,9 @@
   #  testdata/wintestinput3 \
   #  testdata/wintestoutput3
   
  +aiocat_SOURCES = aiocat.c
  +aiocat_LDADD = $(RPMIO_LDADD_COMMON)
  +
   b2sum_SOURCES = b2sum.c
   b2sum_LDADD = $(RPMIO_LDADD_COMMON)
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/zstio.c
  
  $ cvs diff -u -r0 -r1.1.2.1 zstio.c
  --- /dev/null 2017-05-31 01:45:42.0 +0200
  +++ zstio.c   2017-05-31 01:48:23.586825184 +0200
  @@ -0,0 +1,486 @@
  +/** \ingroup rpmio
  + * \file rpmio/zstio.c
  + * Support for ZSTD compression library.
  + */
  +
  +#include "system.h"
  +
  +#if  defined(HAVE_STDBOOL_H)
  +#include 
  +#else
  +typedef  enum { true = 1, false = 0 } bool;
  +#endif
  +
  +#include "rpmio_internal.h"
  +#include 
  +#include 
  +
  +#if defined(WITH_ZSTD)
  +
  +#include 
  +
  +#include "debug.h"
  +
  +#define  ZSTONLY(fd) assert(fdGetIo(fd) == zstio)
  +
  +typedef struct cpio_state_s {
  +uint32_t n;  /* byte progress in cpio header 
*/
  +uint32_t mode;   /* file attributes */
  +uint32_t nlnk;
  +uint32_t size;
  +} * cpio_state;
  +
  +#define RSYNC_WIN 4096
  +
  +typedef struct rsync_state_s {
  +uint32_t n;  /* number of elements in the 
window */
  +uint32_t sum;/* current sum */
  +unsigned char win[RSYNC_WIN];/* window elements */
  +} * rsync_state;
  +
  +typedef void * gzFile;   /* XXX */
  +
  +typedef struct zstdFILE_s {
  +gzFile gz;   /* gzFile is a pointer */
  +struct rsync_state_s rs;
  +struct cpio_state_s cs;
  +uint32_t nb; /* bytes pending for sync */
  +} * zstdFILE;/* like FILE, to use with star */
  +
  +
  +#ifdef __cplusplus
  +GENfree(zstdFILE)
  +#endif   /* __cplusplus */
  +
  +/* Should zstflush be called only after RSYNC_WIN boundaries? */
  +static int enable_rsync = 1;
  +
  +/* === */
  +static
  +const char * zsferror(gzFile gz, int *errnum)
  +{
  +return "";
  +}
  +
  +static
  +gzFile zsfopen(const char *path, const char * fmode, int fdno)
  +{
  +return NULL;
  +}
  +
  +static
  +int zsfread(gzFile gz, void *buf, unsigned count)
  +{
  +int rc = -1;
  +return rc;
  +}
  +
  +static
  +int zsfwrite(gzFile gz, const void *buf, unsigned count)
  +{
  +int rc = -1;
  +return rc;
  +}
  +
  +static
  +int zsfseek(gzFile gz, off_t offset, int whence)
  +{
  +int rc = -1;
  +return rc;
  +}
  +
  +static
  +int zsfclose(gzFile gz)
  +{
  +int rc = -1;
  +return rc;
  +}
  +
  +static
  +int zsfflush(gzFile gz, int flush)
  +{
  +int rc = -1;
  +return rc;
  +}
  +
  +/* === */
  +/* from ../lib/cpio.h */
  +#define CPIO_NEWC_MAGIC "070701"
  +#define PHYS_HDR_SIZE 110
  +
  +#define OFFSET_MODE (sizeof(CPIO_NEWC_MAGIC)-1 + 1*8)
  +#define OFFSET_NLNK (sizeof(CPIO_NEWC_MAGIC)-1 + 4*8)
  +#define 

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am fanotify.c

2017-05-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-May-2017 07:54:19
  Branch: rpm-5_4  Handle: 2017052305541900

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am fanotify.c

  Log:
- WIP.

  Summary:
RevisionChanges Path
1.293.2.81  +4  -1  rpm/rpmio/Makefile.am
1.1.2.4 +205 -265   rpm/rpmio/fanotify.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.80 -r1.293.2.81 Makefile.am
  --- rpm/rpmio/Makefile.am 20 May 2017 13:40:40 -  1.293.2.80
  +++ rpm/rpmio/Makefile.am 23 May 2017 05:54:19 -  1.293.2.81
  @@ -23,7 +23,7 @@
   EXTRA_PROGRAMS += bdes duk thtml tinv tkey tmacro tmq tpw turg
   noinst_PROGRAMS = tjsmn tmqtt
   
  -EXTRA_PROGRAMS += bsdiff bspatch pcrsed rpmborg rpmcurl \
  +EXTRA_PROGRAMS += bsdiff bspatch fanotify pcrsed rpmborg rpmcurl \
rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \
rpmpbzip2 rpmpigz \
tasn tbf tcap tder tdir tfts tget tglob thkp tmagic \
  @@ -492,6 +492,9 @@
   bspatch_SOURCES = bspatch.c
   bspatch_LDADD = $(RPMIO_LDADD_COMMON)
   
  +fanotify_SOURCES = fanotify.c
  +fanotify_LDADD = $(RPMIO_LDADD_COMMON)
  +
   pcrsed_SOURCES = pcrsed.c
   pcrsed_LDADD = $(RPMIO_LDADD_COMMON)
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/fanotify.c
  
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 fanotify.c
  --- rpm/rpmio/fanotify.c  23 May 2017 04:55:11 -  1.1.2.3
  +++ rpm/rpmio/fanotify.c  23 May 2017 05:54:19 -  1.1.2.4
  @@ -15,337 +15,277 @@
*/
   
   /* Define _GNU_SOURCE, Otherwise we don't get O_LARGEFILE */
  +#if !defined(_GNU_SOURCE)
   #define _GNU_SOURCE
  +#endif
  +
  +#include "system.h"
   
  -#include 
  -#include 
  -#include 
  -#include 
  -#include 
  -#include 
  -#include 
  -#include 
  -#include 
   #include 
  -#include 
  +#include 
   
  -#include 
  +#include "debug.h"
   
   /* Structure to keep track of monitored directories */
   typedef struct {
  -  /* Path of the directory */
  -  char *path;
  +/* Path of the directory */
  +char *path;
   } monitored_t;
   
  -/* Size of buffer to use when reading fanotify events */
  -#define FANOTIFY_BUFFER_SIZE 8192
  -
   /* Enumerate list of FDs to poll */
   enum {
  -  FD_POLL_SIGNAL = 0,
  -  FD_POLL_FANOTIFY,
  -  FD_POLL_MAX
  +FD_POLL_SIGNAL = 0,
  +FD_POLL_FANOTIFY,
  +FD_POLL_MAX
   };
   
   /* Setup fanotify notifications (FAN) mask. All these defined in fanotify.h. 
*/
  -static uint64_t event_mask =
  -  (FAN_ACCESS | /* File accessed */
  -   FAN_MODIFY | /* File modified */
  -   FAN_CLOSE_WRITE |/* Writtable file closed */
  -   FAN_CLOSE_NOWRITE |  /* Unwrittable file closed */
  -   FAN_OPEN |   /* File was opened */
  -   FAN_ONDIR |  /* We want to be reported of events in the directory 
*/
  -   FAN_EVENT_ON_CHILD); /* We want to be reported of events in files of the 
directory */
  +static uint64_t event_mask = (
  +FAN_ACCESS | /* File accessed */
  +FAN_MODIFY | /* File modified */
  +FAN_CLOSE_WRITE |/* Writtable file closed */
  +FAN_CLOSE_NOWRITE |  /* Unwrittable file closed */
  +FAN_OPEN |   /* File was opened */
  +FAN_ONDIR |  /* We want events in the directory */
  +FAN_EVENT_ON_CHILD | /* We want events in files of the directory */
  +0);
   
   /* Array of directories being monitored */
   static monitored_t *monitors;
   static int n_monitors;
   
  -static char *
  -get_program_name_from_pid (int pid,
  -char   *buffer,
  -size_t  buffer_size)
  +static char *get_program_name_from_pid(int pid, char *b, size_t nb)
   {
  -  int fd;
  -  ssize_t len;
  -  char *aux;
  -
  -  /* Try to get program name by PID */
  -  sprintf (buffer, "/proc/%d/cmdline", pid);
  -  if ((fd = open (buffer, O_RDONLY)) < 0)
  -return NULL;
  -
  -  /* Read file contents into buffer */
  -  if ((len = read (fd, buffer, buffer_size - 1)) <= 0)
  -{
  -  close (fd);
  -  return NULL;
  -}
  -  close (fd);
  +int fdno;
  +ssize_t len;
  +char *aux;
  +
  +/* Try to get program name by PID */
  +snprintf(b, nb, "/proc/%d/cmdline", pid);
  +fdno = open(b, O_RDONLY);
  +if (fdno < 0)
  + return NULL;
  +
  +/* Read file 

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am tcap.c

2017-05-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-May-2017 19:05:20
  Branch: rpm-5_4  Handle: 2017051017052000

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   tcap.c
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am

  Log:
- cap: test program.

  Summary:
RevisionChanges Path
1.293.2.79  +4  -1  rpm/rpmio/Makefile.am
1.1.2.1 +51 -0  rpm/rpmio/tcap.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.78 -r1.293.2.79 Makefile.am
  --- rpm/rpmio/Makefile.am 4 May 2017 20:55:39 -   1.293.2.78
  +++ rpm/rpmio/Makefile.am 10 May 2017 17:05:20 -  1.293.2.79
  @@ -26,7 +26,7 @@
   EXTRA_PROGRAMS += bsdiff bspatch pcrsed rpmborg rpmcurl \
rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \
rpmpbzip2 rpmpigz \
  - tasn tbf tder tdir tfts tget tglob thkp tmagic \
  + tasn tbf tcap tder tdir tfts tget tglob thkp tmagic \
tmire todbc toid tperl tpython tput trpmio tsexp tsvn tsw ttcl \
dumpasn1 lookup3 trel twitter github tmicrojson
   
  @@ -556,6 +556,9 @@
   tblake2sp.o:  blake2sp.c
@$(LTCOMPILE) -I${top_srcdir} -DBLAKE2SP_SELFTEST -o $@ -c $<
   
  +tcap_SOURCES = tcap.c
  +tcap_LDADD = $(RPMIO_LDADD_COMMON)
  +
   tder_SOURCES = tder.c
   tder_LDADD = $(RPMIO_LDADD_COMMON)
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/tcap.c
  
  $ cvs diff -u -r0 -r1.1.2.1 tcap.c
  --- /dev/null 2017-05-10 19:04:11.0 +0200
  +++ tcap.c2017-05-10 19:05:20.478581768 +0200
  @@ -0,0 +1,51 @@
  +/**
  + * \file rpmio/tcap.c
  + */
  +
  +#include "system.h"
  +#include 
  +#include 
  +#include 
  +#include 
  +#include "debug.h"
  +
  +static int _debug = 0;
  +
  +static struct poptOption rpmcapOptionsTable[] = {
  + { "debug", 'd', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN,   
&_debug, 1,
  + NULL, NULL },
  +
  + { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmioAllPoptTable, 0,
  + N_(" Common options for all rpmio executables:"), NULL },
  +
  +  POPT_AUTOALIAS
  +  POPT_AUTOHELP
  +  POPT_TABLEEND
  +};
  +
  +int
  +main(int argc, char *argv[])
  +{
  +poptContext con = rpmioInit(argc, argv, rpmcapOptionsTable);
  +ARGV_t av = poptGetArgs(con);
  +int ac = argvCount(av);;
  +pid_t pid = getpid();
  +char * text;
  +int rc;
  +int ec = 0;
  +
  +text = rpmcapGetP(pid);
  +fprintf(stderr, "*** rpmcapGetP(%u) \"%s\"\n", (unsigned)pid, text);
  +if (text) free(text);
  +
  +rc = rpmcapDrop("cap_chown");
  +
  +for (int i = 0; i < ac; i++) {
  + const char * arg = av[i];
  + rc = rpmcapTest(arg);
  +fprintf(stderr, "*** rpmcapGet(%s): %d\n", arg, rc);
  +}
  +
  +con = rpmioFini(con);
  +return ec;
  +}
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am rpmcpuid.c tcpuid.c test.cp...

2016-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-2016 16:38:11
  Branch: rpm-5_4  Handle: 2016071614381100

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   rpmcpuid.c tcpuid.c test.cpp
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am

  Log:
- cpuid: stub in a test program.

  Summary:
RevisionChanges Path
1.293.2.76  +11 -3  rpm/rpmio/Makefile.am
1.1.2.1 +304 -0 rpm/rpmio/rpmcpuid.c
1.1.2.1 +100 -0 rpm/rpmio/tcpuid.c
1.1.2.1 +370 -0 rpm/rpmio/test.cpp
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.75 -r1.293.2.76 Makefile.am
  --- rpm/rpmio/Makefile.am 27 Jun 2016 22:00:14 -  1.293.2.75
  +++ rpm/rpmio/Makefile.am 16 Jul 2016 14:38:11 -  1.293.2.76
  @@ -20,8 +20,8 @@
microjson.c mongoc-counters.defs
   
   EXTRA_PROGRAMS = rpmcpio rpmdpkg rpmtar rpmz
  -EXTRA_PROGRAMS += bdes thtml tinv tkey tmacro tpw turg
  -noinst_PROGRAMS = tjsmn duk tmqtt
  +EXTRA_PROGRAMS += bdes duk thtml tinv tkey tmacro tpw turg
  +noinst_PROGRAMS = tjsmn tmqtt
   
   EXTRA_PROGRAMS += bsdiff bspatch pcrsed rpmborg rpmcurl \
rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \
  @@ -31,7 +31,7 @@
dumpasn1 lookup3 trel twitter github tmicrojson
   
   #noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
  -EXTRA_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp
  +EXTRA_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp test 
tcpuid
   noinst_PROGRAMS += tgfs
   if WITH_LIBGIT2
   noinst_PROGRAMS += tgit
  @@ -674,6 +674,14 @@
   tmicrojson_CFLAGS = $(CFLAGS) -DMICROJSON_TEST
   tmicrojson_LDADD = $(RPMIO_LDADD_COMMON)
   
  +tcpuid_SOURCES = tcpuid.c rpmcpuid.c
  +tcpuid_CFLAGS = $(CFLAGS)
  +tcpuid_LDADD = $(RPMIO_LDADD_COMMON)
  +
  +test_SOURCES = test.cpp
  +test_CFLAGS = $(CFLAGS)
  +test_LDADD = $(RPMIO_LDADD_COMMON)
  +
   # XXX FIXME: error: inlining failed in call to always_inline ‘__signbit’
   duktape.o: duktape.c duktape.h
$(COMPILE) $(duk_CFLAGS) -c -o $@ $<
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmcpuid.c
  
  $ cvs diff -u -r0 -r1.1.2.1 rpmcpuid.c
  --- /dev/null 2016-07-16 16:34:10.0 +0200
  +++ rpmcpuid.c2016-07-16 16:38:11.288815370 +0200
  @@ -0,0 +1,304 @@
  +/*
  + * Copyright 2009-2011 Samy Al Bahra.
  + * All rights reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + * 1. Redistributions of source code must retain the above copyright
  + *notice, this list of conditions and the following disclaimer.
  + * 2. Redistributions in binary form must reproduce the above copyright
  + *notice, this list of conditions and the following disclaimer in the
  + *documentation and/or other materials provided with the distribution.
  + *
  + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
  + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  + * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
  + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  + * SUCH DAMAGE.
  + */
  +
  +#include 
  +#include 
  +#include 
  +#include 
  +
  +#include 
  +#include 
  +
  +#define CPUID_BIT(b) (1ULL << (b))
  +
  +struct cpuid {
  +uint32_t eax;
  +uint32_t ebx;
  +uint32_t ecx;
  +uint32_t edx;
  +} __attribute__ ((packed));
  +typedef struct cpuid cpuid_t;
  +
  +static const char *cpuid_vendor_strings[] = {
  +[CPUID_VENDOR_UNKNOWN] = "other",
  +[CPUID_VENDOR_AMD] = "amd",
  +[CPUID_VENDOR_INTEL] = "intel",
  +[CPUID_VENDOR_LENGTH] = NULL
  +};
  +
  +static const char *cpuid_feature_strings[] = {
  +[CPUID_FEATURE_FPU] = "FPU",
  +[CPUID_FEATURE_VME] = "VME",
  +[CPUID_FEATURE_DE] 

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

2016-06-27 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:   28-Jun-2016 00:00:14
  Branch: rpm-5_4  Handle: 2016062722001400

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   tmqtt.c
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am librpmio.vers rpmmqtt.c rpmmqtt.h

  Log:
- mqtt: WIP.

  Summary:
RevisionChanges Path
1.293.2.75  +5  -2  rpm/rpmio/Makefile.am
2.199.2.58  +6  -0  rpm/rpmio/librpmio.vers
1.1.2.3 +189 -107   rpm/rpmio/rpmmqtt.c
1.1.2.3 +14 -2  rpm/rpmio/rpmmqtt.h
1.1.2.1 +68 -0  rpm/rpmio/tmqtt.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.74 -r1.293.2.75 Makefile.am
  --- rpm/rpmio/Makefile.am 25 Jun 2016 22:36:53 -  1.293.2.74
  +++ rpm/rpmio/Makefile.am 27 Jun 2016 22:00:14 -  1.293.2.75
  @@ -15,12 +15,12 @@
rpmcpio.c rpmcpio.h rpmgenbasedir.c rpmgenpkglist.c rpmgensrclist.c \
rpmjsio.msg rpmtar.c rpmtar.h \
tdir.c tfts.c tget.c tgfs.c tgit.c tglob.c thkp.c thtml.c tinv.c tkey.c 
\
  - tmire.c todbc.c tput.c tpython.c trpmio.c tsexp.c tsvn.c tsw.c \
  + tmire.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 testit.sh \
microjson.c mongoc-counters.defs
   
   EXTRA_PROGRAMS = rpmcpio rpmdpkg rpmtar rpmz
  -EXTRA_PROGRAMS += bdes thtml tinv tkey tmacro tpw
  +EXTRA_PROGRAMS += bdes thtml tinv tkey tmacro tpw turg
   noinst_PROGRAMS = tjsmn duk tmqtt
   
   EXTRA_PROGRAMS += bsdiff bspatch pcrsed rpmborg rpmcurl \
  @@ -659,6 +659,9 @@
   tmqtt_SOURCES = tmqtt.c
   tmqtt_LDADD = $(RPMIO_LDADD_COMMON)
   
  +turg_SOURCES = turg.c
  +turg_LDADD = $(RPMIO_LDADD_COMMON)
  +
   github_SOURCES = tjson.c
   github_CFLAGS = -Wall -Werror -std=gnu99 -O2 -DJSMN_GITHUB
   github_LDADD = -lcurl
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/librpmio.vers
  
  $ cvs diff -u -r2.199.2.57 -r2.199.2.58 librpmio.vers
  --- rpm/rpmio/librpmio.vers   27 Jun 2016 03:05:57 -  2.199.2.57
  +++ rpm/rpmio/librpmio.vers   27 Jun 2016 22:00:14 -  2.199.2.58
  @@ -593,6 +593,8 @@
   rpmltcImplVecs;
   rpmLUA_PATH;
   rpmLUA_CPATH;
  +_rpmluaPool;
  +_rpmluavPool;
   rpmluaFiles;
   rpmluaCheckScript;
   rpmluaDelVar;
  @@ -633,7 +635,11 @@
   rpmmgFile;
   rpmmgBuffer;
   _rpmmqtt_debug;
  +rpmmqttConnect;
  +rpmmqttDisconnect;
   rpmmqttNew;
  +rpmmqttWrite;
  +rpmmqttRead;
   _rpmmrb_debug;
   _rpmmrbI;
   _rpmmrbPool;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmmqtt.c
  
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 rpmmqtt.c
  --- rpm/rpmio/rpmmqtt.c   27 Jun 2016 18:27:10 -  1.1.2.2
  +++ rpm/rpmio/rpmmqtt.c   27 Jun 2016 22:00:14 -  1.1.2.3
  @@ -8,6 +8,7 @@
   #include 
   
   #include/* for *Pool methods */
  +#include 
   #include 
   
   #define  _RPMMQTT_INTERNAL
  @@ -15,14 +16,18 @@
   
   #include "debug.h"
   
  -int _rpmmqtt_debug = 0;
  +int _rpmmqtt_debug = -1;
   
  +static char _test_mqtt[] = "test/mqtt";
  +
  +/*==*/
   static int Xcheck(rpmmqtt mqtt, const char * msg, int rc,
int printit, const char * func, const char * fn, unsigned ln)
   {
   
  -if (printit || rc) {
  - fprintf(stderr, "error: %s:%s:%u: MQTTClient_%s(%d)\n",
  +if (rc != 0) {   /* MQTTCLIENT_SUCCESS */
  + int _lvl = RPMLOG_WARNING;
  + rpmlog(_lvl, "%s:%s:%u: MQTTClient_%s(%d)\n",
func, fn, ln, msg, rc);
   }
   return rc;
  @@ -30,50 +35,21 @@
   #define check(_o, _m, _rc)  \
   Xcheck(_o, _m, _rc, _rpmmqtt_debug, __FUNCTION__, __FILE__, __LINE__)
   
  -static void rpmmqttFini(void * _mqtt)
  -{
  -rpmmqtt mqtt = (rpmmqtt) _mqtt;
  -
  -#ifdef   WITH_MQTT
  -{MQTTClient C = (MQTTClient) mqtt->C;
  - int xx;
  - mqtt->msecs = 1;
  - xx = check(mqtt, "disconnect",
  - MQTTClient_disconnect(C, mqtt->msecs));
  - MQTTClient_destroy();
  -}
  -#endif
  -mqtt->C = NULL;
  -
  -if (mqtt->av)
  - (void) argvFree((ARGV_t)mqtt->av);
  -mqtt->av = NULL;
  -mqtt->flags = 0;
  -}
  -
  -RPMIOPOOL_MODULE(mqtt)
  -
  

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am mongoc.c pcrs.c rpmgit.c rp...

2016-05-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-May-2016 19:03:41
  Branch: rpm-5_4  Handle: 2016051017034001

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am mongoc.c pcrs.c rpmgit.c rpmio.c
rpmpgp.c ttpm.c

  Log:
- reformat to avoid gcc-6.1.1 warnings.

  Summary:
RevisionChanges Path
1.293.2.68  +2  -2  rpm/rpmio/Makefile.am
1.1.2.14+2  -0  rpm/rpmio/mongoc.c
1.1.2.7 +2  -0  rpm/rpmio/pcrs.c
2.1.2.56+4  -4  rpm/rpmio/rpmgit.c
1.230.2.31  +3  -1  rpm/rpmio/rpmio.c
2.127.2.20  +2  -2  rpm/rpmio/rpmpgp.c
2.6.2.7 +2  -1  rpm/rpmio/ttpm.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.67 -r1.293.2.68 Makefile.am
  --- rpm/rpmio/Makefile.am 5 May 2016 22:27:47 -   1.293.2.67
  +++ rpm/rpmio/Makefile.am 10 May 2016 17:03:40 -  1.293.2.68
  @@ -5,7 +5,7 @@
   LINT = splint
   MCCABE = pmccabe
   
  -SUBDIRS = # auto # tests
  +SUBDIRS = auto # tests
   
   CLEANFILES = *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
   
  @@ -532,7 +532,7 @@
   tget_LDADD = $(RPMIO_LDADD_COMMON)
   
   tgfs_SOURCES = tgfs.c
  -tgfs_LDADD = $(RPMIO_LDADD_COMMON) -lrt
  +tgfs_LDADD = $(RPMIO_LDADD_COMMON)
   
   tgit_SOURCES = tgit.c
   tgit_LDADD = $(RPMIO_LDADD_COMMON)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/mongoc.c
  
  $ cvs diff -u -r1.1.2.13 -r1.1.2.14 mongoc.c
  --- rpm/rpmio/mongoc.c8 May 2016 18:47:26 -   1.1.2.13
  +++ rpm/rpmio/mongoc.c10 May 2016 17:03:40 -  1.1.2.14
  @@ -14009,7 +14009,9 @@
  }
   
   assert(data != NULL);/* XXX coverity 1357858 */
  +#ifdef   NOTYET  /* tgfs put fails here */
   assert(len > 0); /* XXX coverity 1357857 */
  +#endif
  file->page = _mongoc_gridfs_file_page_new (data, len, file->chunk_size);
   
  /* seek in the page towards wherever we're supposed to be */
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/pcrs.c
  
  $ cvs diff -u -r1.1.2.6 -r1.1.2.7 pcrs.c
  --- rpm/rpmio/pcrs.c  6 Oct 2014 19:43:58 -   1.1.2.6
  +++ rpm/rpmio/pcrs.c  10 May 2016 17:03:41 -  1.1.2.7
  @@ -41,9 +41,11 @@
   
   #define PCRS_H_VERSION "$Id: pcrs.h,v 1.11 2002/03/08 14:18:23 oes Exp $"
   
  +#ifdef   DYING
   #if !defined(lint) && !defined(__clang__)
   static const char pcrs_h_rcs[] = PCRS_H_VERSION;
   #endif
  +#endif
   
   #define FALSE 0
   #define TRUE 1
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmgit.c
  
  $ cvs diff -u -r2.1.2.55 -r2.1.2.56 rpmgit.c
  --- rpm/rpmio/rpmgit.c27 Feb 2016 19:59:20 -  2.1.2.55
  +++ rpm/rpmio/rpmgit.c10 May 2016 17:03:41 -  2.1.2.56
  @@ -1863,11 +1863,11 @@
xx = chkgit(git, "treeish_to_tree",
treeish_to_tree(, git->R, "HEAD"));
   
  - if (o.cache == CACHE_NONE)
  - xx = chkgit(git, "git_diff_tree_to_workdir",
  + if (o.cache == CACHE_NONE)
  + xx = chkgit(git, "git_diff_tree_to_workdir",
git_diff_tree_to_workdir(, git->R, t1, 
));
  - else
  - xx = chkgit(git, "git_diff_tree_to_index",
  + else
  + xx = chkgit(git, "git_diff_tree_to_index",
git_diff_tree_to_index(, git->R, t1, NULL, 
));
   }
   else if (t1)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmio.c
  
  $ cvs diff -u -r1.230.2.30 -r1.230.2.31 rpmio.c
  --- rpm/rpmio/rpmio.c 5 May 2016 22:20:56 -   1.230.2.30
  +++ rpm/rpmio/rpmio.c 10 May 2016 17:03:41 -  1.230.2.31
  @@ -321,7 +321,9 @@
   
   assert(fd != NULL);
   fd->opath = _free(fd->opath);
  -if (fd->stats) free(fd->stats); fd->stats = NULL;
  +if (fd->stats)
  + free(fd->stats);
  +fd->stats = NULL;
   if (fd->ndigests > 0)
   for (i = fd->ndigests - 1; i >= 0; i--) {
DIGEST_CTX ctx = fd->digests[i];
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmpgp.c
  
  $ cvs diff -u -r2.127.2.19 -r2.127.2.20 rpmpgp.c
  --- rpm/rpmio/rpmpgp.c19 Apr 2016 13:03:10 -  2.127.2.19
  

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

2016-05-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:   06-May-2016 00:27:47
  Branch: rpm-5_4  Handle: 2016050522274700

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

  Log:
- get rid of autotests for now.

  Summary:
RevisionChanges Path
1.293.2.67  +1  -1  rpm/rpmio/Makefile.am
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.66 -r1.293.2.67 Makefile.am
  --- rpm/rpmio/Makefile.am 20 Apr 2016 09:35:50 -  1.293.2.66
  +++ rpm/rpmio/Makefile.am 5 May 2016 22:27:47 -   1.293.2.67
  @@ -5,7 +5,7 @@
   LINT = splint
   MCCABE = pmccabe
   
  -SUBDIRS = auto # tests
  +SUBDIRS = # auto # tests
   
   CLEANFILES = *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


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

2016-04-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-Apr-2016 11:35:51
  Branch: rpm-5_4  Handle: 2016042009355001

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

  Log:
- rpmio: reenable auto subdir.

  Summary:
RevisionChanges Path
1.293.2.66  +1  -1  rpm/rpmio/Makefile.am
1.5.2.10+1  -1  rpm/rpmio/auto/Makefile.am
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.65 -r1.293.2.66 Makefile.am
  --- rpm/rpmio/Makefile.am 19 Apr 2016 13:09:10 -  1.293.2.65
  +++ rpm/rpmio/Makefile.am 20 Apr 2016 09:35:50 -  1.293.2.66
  @@ -5,7 +5,7 @@
   LINT = splint
   MCCABE = pmccabe
   
  -SUBDIRS = # auto # tests
  +SUBDIRS = auto # tests
   
   CLEANFILES = *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/auto/Makefile.am
  
  $ cvs diff -u -r1.5.2.9 -r1.5.2.10 Makefile.am
  --- rpm/rpmio/auto/Makefile.am19 Apr 2016 12:52:46 -  1.5.2.9
  +++ rpm/rpmio/auto/Makefile.am20 Apr 2016 09:35:51 -  1.5.2.10
  @@ -14,7 +14,7 @@
   
   clean-local:
rm -rf $(TDIRS) desc.xml
  - [ -d tests ] && find tests -name '*.gcno' -exec rm -f {} \;
  + -[ -d tests ] && find tests -name '*.gcno' -exec rm -f {} \;
   
   check-local: desc.xml
-[ -d tests ] && ${AUTOTEST} -l rpmio -d desc.xml -clean
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


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

2016-04-19 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:   19-Apr-2016 15:09:10
  Branch: rpm-5_4  Handle: 2016041913091000

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

  Log:
- comment out auto subdir for now.

  Summary:
RevisionChanges Path
1.293.2.65  +8  -6  rpm/rpmio/Makefile.am
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.64 -r1.293.2.65 Makefile.am
  --- rpm/rpmio/Makefile.am 10 Apr 2016 22:12:09 -  1.293.2.64
  +++ rpm/rpmio/Makefile.am 19 Apr 2016 13:09:10 -  1.293.2.65
  @@ -5,7 +5,7 @@
   LINT = splint
   MCCABE = pmccabe
   
  -SUBDIRS = auto # tests
  +SUBDIRS = # auto # tests
   
   CLEANFILES = *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda
   
  @@ -29,7 +29,9 @@
tmire todbc toid tperl tpython tput trpmio tsexp tsvn tsw ttcl \
dumpasn1 lookup3 trel twitter github tmicrojson
   
  -noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
  +#noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
  +EXTRA_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp
  +noinst_PROGRAMS += tgfs
   if WITH_LIBGIT2
   noinst_PROGRAMS += tgit
   else
  @@ -126,8 +128,8 @@
   noinst_HEADERS = \
ar.h bcon.h bson.h cpio.h crc.h envvar.h fnmatch.h fts.h glob.h iosm.h \
blake2.h blake2-impl.h blake2-rpm.h blake2-kat.h \
  - arirang.h blake.h bmw.h chi.h cubehash.h echo.h fugue.h \
  - groestl.h hamsi.h jh.h jsmn.h keccak.h luffa.h md2.h md6.h \
  + arirang.h blake.h bmw.h chi.h cubehash.h echo.h edon-r.h fugue.h \
  + groestl.h hamsi.h jh.h jsmn.h keccak.h lane.h luffa.h md2.h md6.h \
duktape.h mongoc.h radiogatun.h \
salsa10.h salsa20.h shabal.h shavite3.h simd.h skein.h tib3.h tiger.h \
pcrs.h poptIO.h rpmacl.h rpmasn.h rpmaug.h rpmbag.h rpmbc.h rpmbz.h \
  @@ -147,8 +149,8 @@
   librpmio_la_SOURCES = \
getdate.c \
blake2b.c blake2bp.c blake2s.c blake2sp.c blake2-rpm.c \
  - arirang.c blake.c bmw.c chi.c cubehash.c echo.c fugue.c \
  - groestl.c hamsi.c jh.c keccak.c luffa.c md2.c md6.c radiogatun.c\
  + arirang.c blake.c bmw.c chi.c cubehash.c echo.c edon-r.c fugue.c \
  + 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 \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


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

2016-03-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-Mar-2016 23:12:25
  Branch: rpm-5_4  Handle: 2016032122122500

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

  Log:
- tgfs: always add -lrt.

  Summary:
RevisionChanges Path
1.293.2.63  +1  -1  rpm/rpmio/Makefile.am
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.62 -r1.293.2.63 Makefile.am
  --- rpm/rpmio/Makefile.am 13 Mar 2016 23:44:47 -  1.293.2.62
  +++ rpm/rpmio/Makefile.am 21 Mar 2016 22:12:25 -  1.293.2.63
  @@ -530,7 +530,7 @@
   tget_LDADD = $(RPMIO_LDADD_COMMON)
   
   tgfs_SOURCES = tgfs.c
  -tgfs_LDADD = $(RPMIO_LDADD_COMMON)
  +tgfs_LDADD = $(RPMIO_LDADD_COMMON) -lrt
   
   tgit_SOURCES = tgit.c
   tgit_LDADD = $(RPMIO_LDADD_COMMON)
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


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

2016-02-27 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:   27-Feb-2016 22:09:07
  Branch: rpm-5_4  Handle: 2016022721090700

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

  Log:
Fix a typo in the rpmio Makefile.am

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
1.293.2.57  +1  -1  rpm/rpmio/Makefile.am
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.56 -r1.293.2.57 Makefile.am
  --- rpm/rpmio/Makefile.am 17 May 2015 05:03:40 -  1.293.2.56
  +++ rpm/rpmio/Makefile.am 27 Feb 2016 21:09:07 -  1.293.2.57
  @@ -121,7 +121,7 @@
   
   pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
   pkginc_HEADERS = argv.h mire.h rpmzlog.h yarn.h \
  - rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h
  + rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h \
rpmpgp.h rpmsw.h rpmutil.h
   noinst_HEADERS = \
ar.h bcon.h bson.h cpio.h crc.h envvar.h fnmatch.h fts.h glob.h iosm.h \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am duktape.c

2015-05-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:   17-May-2015 07:03:41
  Branch: rpm-5_4  Handle: 2015051705034000

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am duktape.c

  Log:
- duktape: use $(CFLAGS) etc with specific overrides.

  Summary:
RevisionChanges Path
1.293.2.56  +4  -3  rpm/rpmio/Makefile.am
1.1.2.2 +40 -0  rpm/rpmio/duktape.c
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.55 -r1.293.2.56 Makefile.am
  --- rpm/rpmio/Makefile.am 17 May 2015 03:59:36 -  1.293.2.55
  +++ rpm/rpmio/Makefile.am 17 May 2015 05:03:40 -  1.293.2.56
  @@ -627,10 +627,11 @@
   tmicrojson_CFLAGS = $(CFLAGS) -DMICROJSON_TEST
   tmicrojson_LDADD = $(RPMIO_LDADD_COMMON)
   
  +# XXX FIXME: error: inlining failed in call to always_inline ‘__signbit’
   duktape.o: duktape.c
  - gcc -Os -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer 
-DDUK_OPT_SELF_TESTS -c -o $@ $
  + $(COMPILE) $(duk_CFLAGS) -c -o $@ $
   
   duk_SOURCES = duk.c
  -duk_CFLAGS = -Os -pedantic -std=c99 -Wall -fstrict-aliasing 
-fomit-frame-pointer -DDUK_OPT_SELF_TESTS -DDUK_SHELL
  -duk_LDADD = duktape.o -lm
  +duk_CFLAGS = -Os -pedantic -std=c99 -Wall -Wno-suggest-attribute=pure 
-fstrict-aliasing -fomit-frame-pointer -DDUK_OPT_SELF_TESTS -DDUK_CMDLINE_FANCY
  +duk_LDADD = duktape.o -lreadline -lncurses -lm
   
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/duktape.c
  
  $ cvs diff -u -r1.1.2.1 -r1.1.2.2 duktape.c
  --- rpm/rpmio/duktape.c   17 May 2015 03:59:36 -  1.1.2.1
  +++ rpm/rpmio/duktape.c   17 May 2015 05:03:40 -  1.1.2.2
  @@ -1,3 +1,5 @@
  +#include rpmutil.h
  +
   /*
*  Single file autogenerated distributable for Duktape 1.2.1.
*  Git commit 74bd1c845e5198b5e2d6cb7c98e54c3af1d6c0e4 (v1.2.1).
  @@ -12787,6 +12789,7 @@
DUK_ERROR(thr, DUK_ERR_TYPE_ERROR, DUK_STR_NOT_CONSTRUCTABLE);
   }
   
  +RPM_GNUC_PURE
   DUK_EXTERNAL duk_bool_t duk_is_constructor_call(duk_context *ctx) {
duk_hthread *thr = (duk_hthread *) ctx;
duk_activation *act;
  @@ -12800,6 +12803,7 @@
return ((act-flags  DUK_ACT_FLAG_CONSTRUCT) != 0 ? 1 : 0);
   }
   
  +RPM_GNUC_PURE
   DUK_EXTERNAL duk_bool_t duk_is_strict_call(duk_context *ctx) {
duk_hthread *thr = (duk_hthread *) ctx;
duk_activation *act;
  @@ -12829,6 +12833,7 @@
*  Duktape/C function magic
*/
   
  +RPM_GNUC_PURE
   DUK_EXTERNAL duk_int_t duk_get_current_magic(duk_context *ctx) {
duk_hthread *thr = (duk_hthread *) ctx;
duk_activation *act;
  @@ -13572,6 +13577,7 @@
   
   #else  /* DUK_USE_DEBUGGER_SUPPORT */
   
  +RPM_GNUC_NORETURN
   DUK_EXTERNAL void duk_debugger_attach(duk_context *ctx,
 duk_debug_read_function read_cb,
 duk_debug_write_function write_cb,
  @@ -13590,10 +13596,12 @@
duk_error(ctx, DUK_ERR_API_ERROR, no debugger support);
   }
   
  +RPM_GNUC_NORETURN
   DUK_EXTERNAL void duk_debugger_detach(duk_context *ctx) {
duk_error(ctx, DUK_ERR_API_ERROR, no debugger support);
   }
   
  +RPM_GNUC_CONST
   DUK_EXTERNAL void duk_debugger_cooperate(duk_context *ctx) {
/* nop */
DUK_UNREF(ctx);
  @@ -14645,6 +14653,7 @@
*  There's some repetition because of this; keep the functions in sync.
*/
   
  +RPM_GNUC_PURE
   DUK_EXTERNAL duk_idx_t duk_normalize_index(duk_context *ctx, duk_idx_t 
index) {
duk_hthread *thr = (duk_hthread *) ctx;
duk_idx_t vs_size;
  @@ -14775,6 +14784,7 @@
   }
   
   /* Non-critical. */
  +RPM_GNUC_PURE
   DUK_EXTERNAL duk_bool_t duk_is_valid_index(duk_context *ctx, duk_idx_t 
index) {
DUK_ASSERT(DUK_INVALID_INDEX  0);
return (duk_normalize_index(ctx, index) = 0);
  @@ -14796,6 +14806,7 @@
*  Value stack top handling
*/
   
  +RPM_GNUC_PURE
   DUK_EXTERNAL duk_idx_t duk_get_top(duk_context *ctx) {
duk_hthread *thr = (duk_hthread *) ctx;
   
  @@ -14891,6 +14902,7 @@
DUK_ERROR(thr, DUK_ERR_API_ERROR, DUK_STR_INVALID_INDEX);
   }
   
  +RPM_GNUC_PURE
   DUK_EXTERNAL duk_idx_t duk_get_top_index(duk_context *ctx) {
duk_hthread *thr = (duk_hthread *) ctx;
duk_idx_t ret;
  @@ -15546,6 +15558,7 @@
return;  /* not reachable */
   }
   
  +RPM_GNUC_PURE
   DUK_EXTERNAL duk_bool_t duk_get_boolean(duk_context *ctx, 

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

2015-02-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-Feb-2015 11:04:45
  Branch: rpm-5_4  Handle: 2015022310044500

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

  Log:
- use byacc instead of bison.

  Summary:
RevisionChanges Path
1.293.2.46  +1  -0  rpm/rpmio/Makefile.am
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.45 -r1.293.2.46 Makefile.am
  --- rpm/rpmio/Makefile.am 25 Oct 2014 18:11:56 -  1.293.2.45
  +++ rpm/rpmio/Makefile.am 23 Feb 2015 10:04:45 -  1.293.2.46
  @@ -280,6 +280,7 @@
   rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.cpp
@$(LTCOMPILE) -O0 -c $
   
  +YACC = byacc -d
   getdate.c: getdate.y
@echo expect 10 shift/reduce conflicts
$(YACC) $(srcdir)/getdate.y
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


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

2014-10-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:   25-Oct-2014 20:12:04
  Branch: rpm-5_4  Handle: 20100912221957129930724

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am librpmio.vers macro.c rpmjs.cpp
  Removed files:(Branch: rpm-5_4)
rpm/rpmio   rpmjs.c

  Log:
- rpmjs: changes necessary to use js-1.8.5 in *.cpp not *.c.

  Summary:
RevisionChanges Path
1.293.2.45  +2  -2  rpm/rpmio/Makefile.am
2.199.2.52  +1  -0  rpm/rpmio/librpmio.vers
2.249.2.27  +11 -9  rpm/rpmio/macro.c
1.36+0  -442rpm/rpmio/rpmjs.c
1.1.2.3 +595 -97rpm/rpmio/rpmjs.cpp
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.44 -r1.293.2.45 Makefile.am
  --- rpm/rpmio/Makefile.am 11 Oct 2014 22:39:03 -  1.293.2.44
  +++ rpm/rpmio/Makefile.am 25 Oct 2014 18:11:56 -  1.293.2.45
  @@ -277,8 +277,8 @@
   # 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 $
  +rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.cpp
  + @$(LTCOMPILE) -O0 -c $
   
   getdate.c: getdate.y
@echo expect 10 shift/reduce conflicts
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/librpmio.vers
  
  $ cvs diff -u -r2.199.2.51 -r2.199.2.52 librpmio.vers
  --- rpm/rpmio/librpmio.vers   4 Oct 2014 17:21:56 -   2.199.2.51
  +++ rpm/rpmio/librpmio.vers   25 Oct 2014 18:11:58 -  2.199.2.52
  @@ -418,6 +418,7 @@
   rpmDigestInit;
   rpmDigestName;
   rpmDigestPoptTable;
  +_rpmdir_debug;
   rpmDigestUpdate;
   rpmDumpMacroTable;
   rpmExpand;
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/macro.c
  
  $ cvs diff -u -r2.249.2.26 -r2.249.2.27 macro.c
  --- rpm/rpmio/macro.c 12 Oct 2014 21:19:00 -  2.249.2.26
  +++ rpm/rpmio/macro.c 25 Oct 2014 18:12:00 -  2.249.2.27
  @@ -2048,15 +2048,17 @@
if (rpmjsRun(js, script, result) != RPMRC_OK)
rc = 1;
else {
  -   if (result == NULL) result = 
_FIXME_embedded_interpreter_eval_returned_null;
  -   if (result != NULL  *result != '\0') {
  - size_t len = strlen(result);
  - if (len  mb-nb)
  - len = mb-nb;
  - memcpy(mb-t, result, len);
  - mb-t += len;
  - mb-nb -= len;
  -  }
  + if (result == NULL)
  + result = 
xstrdup(_FIXME_embedded_interpreter_eval_returned_null);
  + if (*result != '\0') {
  + size_t len = strlen(result);
  + if (len  mb-nb)
  + len = mb-nb;
  + memcpy(mb-t, result, len);
  + mb-t += len;
  + mb-nb -= len;
  + }
  + result = _free(result);
}
js = rpmjsFree(js);
av = _free(av);
  @@ .
  rm -f rpm/rpmio/rpmjs.c '@@ .'
  Index: rpm/rpmio/rpmjs.c
  
  [NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmjs.cpp
  
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 rpmjs.cpp
  --- rpm/rpmio/rpmjs.cpp   12 Oct 2014 21:19:02 -  1.1.2.2
  +++ rpm/rpmio/rpmjs.cpp   25 Oct 2014 18:12:01 -  1.1.2.3
  @@ -61,40 +61,361 @@
   JSObject *global;
   };
   
  -#if defined(WITH_MOZJS24) || defined(WITH_MOZJS31)
  -typedef  unsigned uintN;
  +static void
  +rpmjsReportError(JSContext *cx, const char *message, JSErrorReport *report)
  +{
  +fprintf(stderr, %s:%u:%s\n,
  + report-filename ? report-filename : no filename=\filename\,
  + (unsigned int) report-lineno, message);
  +}
  +
  +/*==*/
  +static JSBool compileOnly = JS_FALSE;
  +
  +static JSBool
  +Version(JSContext *cx, uintN argc, jsval *vp)
  +{
  +jsval *argv = JS_ARGV(cx, vp);
  +if (argc  0  JSVAL_IS_INT(argv[0]))
  +*vp = INT_TO_JSVAL(JS_SetVersion(cx, (JSVersion) 

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am macro.c rpmjs.cpp

2014-10-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:   12-Oct-2014 00:39:22
  Branch: rpm-5_4  Handle: 2014101122390317

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   rpmjs.cpp
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am macro.c

  Log:
- js: resurrect js-1.8.5 in C++.

  Summary:
RevisionChanges Path
1.293.2.44  +5  -3  rpm/rpmio/Makefile.am
2.249.2.25  +3  -3  rpm/rpmio/macro.c
1.1.2.1 +326 -0 rpm/rpmio/rpmjs.cpp
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.43 -r1.293.2.44 Makefile.am
  --- rpm/rpmio/Makefile.am 9 Oct 2014 02:37:38 -   1.293.2.43
  +++ rpm/rpmio/Makefile.am 11 Oct 2014 22:39:03 -  1.293.2.44
  @@ -150,7 +150,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.c rpmjsio.c rpmkeyring.c \
  + rpmjs.cpp rpmjsio.c rpmkeyring.c \
rpmnix.c rpmodbc.c rpmsql.c set.c \
ar.c \
argv.c \
  @@ -275,8 +275,10 @@
   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.c
  +#@$(LTCOMPILE) -O0 -c $
  +#rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.cpp
  +#@$(LTCOMPILE) -O0 -c $
   
   getdate.c: getdate.y
@echo expect 10 shift/reduce conflicts
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/macro.c
  
  $ cvs diff -u -r2.249.2.24 -r2.249.2.25 macro.c
  --- rpm/rpmio/macro.c 27 Sep 2014 15:51:22 -  2.249.2.24
  +++ rpm/rpmio/macro.c 11 Oct 2014 22:39:09 -  2.249.2.25
  @@ -107,7 +107,7 @@
   #include debug.h
   
   /*@unchecked@*/
  -#if defined(WITH_AUGEAS) || defined(WITH_FICL) || defined(WITH_GPSEE) || 
defined(WITH_NIX) || defined(WITH_PERLEMBED) || defined(WITH_PYTHONEMBED) || 
defined(WITH_RUBYEMBED) || defined(WITH_SQLITE) || defined(WITH_SQUIRREL) || 
defined(WITH_TCL)
  +#if defined(WITH_AUGEAS) || defined(WITH_FICL) || defined(WITH_MOZJS185) || 
defined(WITH_GPSEE) || defined(WITH_NIX) || defined(WITH_PERLEMBED) || 
defined(WITH_PYTHONEMBED) || defined(WITH_RUBYEMBED) || defined(WITH_SQLITE) || 
defined(WITH_SQUIRREL) || defined(WITH_TCL)
   static int _globalI = 0x8000;
   #endif
   
  @@ -1612,7 +1612,7 @@
* @retval *avp  invocation args
* @return   script string
*/
  -#if defined(WITH_AUGEAS) || defined(WITH_FICL) || defined(WITH_GPSEE) || 
defined(WITH_JNIEMBED) || defined(WITH_PERLEMBED) || defined(WITH_PYTHONEMBED) 
|| defined(WITH_RUBYEMBED) || defined(WITH_MRUBY_EMBED) || defined(WITH_SQLITE) 
|| defined(WITH_SQUIRREL) || defined(WITH_TCL)
  +#if defined(WITH_AUGEAS) || defined(WITH_FICL) || defined(WITH_MOZJS185) || 
defined(WITH_GPSEE) || defined(WITH_JNIEMBED) || defined(WITH_PERLEMBED) || 
defined(WITH_PYTHONEMBED) || defined(WITH_RUBYEMBED) || 
defined(WITH_MRUBY_EMBED) || defined(WITH_SQLITE) || defined(WITH_SQUIRREL) || 
defined(WITH_TCL)
   
   static char _FIXME_embedded_interpreter_eval_returned_null[] =
   FIXME: embedded interpreter eval returned null.;
  @@ -2034,7 +2034,7 @@
}
   #endif
   
  -#ifdef   WITH_GPSEE
  +#if defined(WITH_GPSEE) || defined(WITH_MOZJS185)
if (STREQ(js, f, fn)) {
char ** av = NULL;
char * script = parseEmbedded(s, (size_t)(se-s), av);
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmjs.cpp
  
  $ cvs diff -u -r0 -r1.1.2.1 rpmjs.cpp
  --- /dev/null 2014-10-12 00:37:17.0 +0200
  +++ rpmjs.cpp 2014-10-12 00:39:22.367012976 +0200
  @@ -0,0 +1,326 @@
  +#include system.h
  +
  +#include rpmio_internal.h
  +#include argv.h
  +#include popt.h
  +
  +#if defined(__APPLE__)
  +#include crt_externs.h
  +#else
  +extern char ** environ;
  +#endif
  +
  +#if defined(WITH_MOZJS185)
  +#define  JS_THREADSAFE   1
  +#include jsapi.h
  +#endif   /* WITH_MOZJS185 */
  +
  +#define _RPMJS_INTERNAL
  +#include rpmjs.h
  +
  +#include debug.h
  +
  +#define F_ISSET(_flags, _FLAG) ((_flags)  RPMJS_FLAGS_##_FLAG)
  +
  +int _rpmjs_debug = 0;
  +
  +#define RPMJSDBG(_t, _l) \
  +  if ((_t) || _rpmjs_debug) fprintf _l
  +
  +rpmjs 

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

2014-10-01 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-Oct-2014 17:27:34
  Branch: rpm-5_4  Handle: 2014100115273102

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   rpmgfs.c rpmgfs.h
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am librpmio.vers poptIO.c rpmio.c

  Log:
- gfs: stub in a gridfs object with file I/O.

  Summary:
RevisionChanges Path
1.293.2.41  +3  -1  rpm/rpmio/Makefile.am
2.199.2.48  +7  -0  rpm/rpmio/librpmio.vers
1.94.2.18   +3  -7  rpm/rpmio/poptIO.c
1.1.2.1 +190 -0 rpm/rpmio/rpmgfs.c
1.1.2.1 +113 -0 rpm/rpmio/rpmgfs.h
1.230.2.27  +4  -10 rpm/rpmio/rpmio.c
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.40 -r1.293.2.41 Makefile.am
  --- rpm/rpmio/Makefile.am 30 Sep 2014 22:31:42 -  1.293.2.40
  +++ rpm/rpmio/Makefile.am 1 Oct 2014 15:27:31 -   1.293.2.41
  @@ -128,7 +128,8 @@
radiogatun.h \
salsa10.h salsa20.h shabal.h shavite3.h simd.h skein.h tib3.h tiger.h \
pcrs.h poptIO.h rpmacl.h rpmasn.h rpmaug.h rpmbag.h rpmbc.h rpmbz.h \
  - rpmcdsa.h rpmct.h rpmcudf.h rpmcvs.h rpmdate.h rpmdav.h rpmdir.h 
rpmficl.h rpmgc.h rpmgit.h rpmhash.h \
  + rpmcdsa.h rpmct.h rpmcudf.h rpmcvs.h rpmdate.h rpmdav.h rpmdir.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 rpmmg.h rpmmrb.h rpmnix.h rpmnss.h \
  @@ -185,6 +186,7 @@
rpmdir.c \
rpmficl.c \
rpmgc.c \
  + rpmgfs.c \
rpmhash.c \
rpmhkp.c \
rpmhook.c \
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/librpmio.vers
  
  $ cvs diff -u -r2.199.2.47 -r2.199.2.48 librpmio.vers
  --- rpm/rpmio/librpmio.vers   30 Sep 2014 22:31:43 -  2.199.2.47
  +++ rpm/rpmio/librpmio.vers   1 Oct 2014 15:27:31 -   2.199.2.48
  @@ -431,6 +431,13 @@
   rpmGenPath;
   rpmGetMacroEntries;
   rpmGetPath;
  +_rpmgfs_debug;
  +_rpmgfsI;
  +rpmgfsClose;
  +rpmgfsNew;
  +rpmgfsOpen;
  +rpmgfsRead;
  +rpmgfsWrite;
   _rpmgit_debug;
   _rpmgit_dir;
   _rpmgit_tree;
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/poptIO.c
  
  $ cvs diff -u -r1.94.2.17 -r1.94.2.18 poptIO.c
  --- rpm/rpmio/poptIO.c30 Sep 2014 22:31:43 -  1.94.2.17
  +++ rpm/rpmio/poptIO.c1 Oct 2014 15:27:33 -   1.94.2.18
  @@ -28,9 +28,7 @@
   
   #include rpmasn.h
   #include rpmtpm.h
  -#ifdef   NOTYET
  -#include mongo.h
  -#endif
  +#include rpmgfs.h
   
   #include rpmaug.h
   #include rpmbag.h
  @@ -697,10 +695,8 @@
N_(Debug rpmmg magic), NULL},
{ rpmmrbdebug, '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, 
_rpmmrb_debug, -1,
N_(Debug embedded MRuby interpreter), NULL},
  -#ifdef NOTYET
  - { mongodebug, '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, _rpmmgo_debug, 
-1,
  - N_(Debug Mongo DB connection), NULL},
  -#endif
  + { rpmgfsdebug, '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, 
_rpmgfs_debug, -1,
  + N_(Debug Mongo DB gridfs connection), NULL},
{ nixdebug, '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, _rpmnix_debug, 
-1,
N_(Debug embedded Nix interpreter), NULL},
{ odbcdebug, '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, _odbc_debug, -1,
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmgfs.c
  
  $ cvs diff -u -r0 -r1.1.2.1 rpmgfs.c
  --- /dev/null 2014-10-01 17:22:00.0 +0200
  +++ rpmgfs.c  2014-10-01 17:27:34.354348790 +0200
  @@ -0,0 +1,190 @@
  +#include system.h
  +
  +#include rpmiotypes.h
  +#include rpmio.h
  +#include rpmlog.h
  +#include rpmurl.h
  +
  +#define  _RPMGFS_INTERNAL
  +#include rpmgfs.h
  +
  +#include debug.h
  +
  +int _rpmgfs_debug;
  +
  +rpmgfs _rpmgfsI;
  +
  +static int gfs_opens;
  +
  +/*==*/
  +ssize_t rpmgfsRead(rpmgfs gfs, void * buf, size_t count)
  +{
  +bson_error_t err;
  +ssize_t rc = 0;
  +
  +gfs-iov.iov_base = buf;
  +gfs-iov.iov_len = count;
  +
  +if (gfs-S == NULL) {
  + gfs-F = mongoc_gridfs_find_one_by_filename(gfs-G, gfs-fn, err);
  +assert(gfs-F);
  +
  + 

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am ar.h argv.h bson.h cpio.h c...

2014-09-27 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:   27-Sep-2014 17:51:27
  Branch: rpm-5_4  Handle: 2014092715512104

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   rpmutil.h
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am ar.h argv.h bson.h cpio.h crc.h iosm.h
lookup3.c macro.c md2.h mire.h mongo.c mongo.h
rpmbc.h rpmbf.h rpmcudf.h rpmficl.h rpmgit.c
rpmgit.h rpmio.h rpmiotypes.h rpmjni.h rpmjs.h
rpmlog.c rpmlog.h rpmmacro.h rpmmrb.h rpmperl.h
rpmpgp.h rpmpython.h rpmruby.h rpmsq.h rpmsql.c
rpmsql.h rpmsquirrel.h rpmsvn.c rpmsw.c rpmsw.h
rpmtcl.h rpmtpm.c rpmxar.h salsa10.h salsa20.h
tar.h tiger.h ttpm.c

  Log:
- rpmio: -Wdocumentation fixes.

  Summary:
RevisionChanges Path
1.293.2.38  +2  -1  rpm/rpmio/Makefile.am
1.5.8.1 +3  -3  rpm/rpmio/ar.h
1.17.4.4+1  -0  rpm/rpmio/argv.h
2.3.4.8 +10 -9  rpm/rpmio/bson.h
1.5.8.1 +2  -2  rpm/rpmio/cpio.h
2.1.6.2 +1  -0  rpm/rpmio/crc.h
1.18.4.4+8  -3  rpm/rpmio/iosm.h
1.6.6.6 +3  -4  rpm/rpmio/lookup3.c
2.249.2.24  +1  -1  rpm/rpmio/macro.c
1.3.10.1+2  -2  rpm/rpmio/md2.h
1.32.4.2+1  -1  rpm/rpmio/mire.h
2.3.4.10+13 -7  rpm/rpmio/mongo.c
2.2.4.7 +22 -15 rpm/rpmio/mongo.h
2.14.2.7+7  -0  rpm/rpmio/rpmbc.h
2.8.4.3 +5  -5  rpm/rpmio/rpmbf.h
2.6.2.1 +9  -0  rpm/rpmio/rpmcudf.h
2.6.2.1 +2  -2  rpm/rpmio/rpmficl.h
2.1.2.51+9  -12 rpm/rpmio/rpmgit.c
2.1.2.24+1  -4  rpm/rpmio/rpmgit.h
1.97.2.5+13 -5  rpm/rpmio/rpmio.h
1.47.2.20   +1  -1  rpm/rpmio/rpmiotypes.h
1.1.2.2 +1  -1  rpm/rpmio/rpmjni.h
1.10.2.1+2  -2  rpm/rpmio/rpmjs.h
2.46.4.6+2  -2  rpm/rpmio/rpmlog.c
2.24.4.3+4  -3  rpm/rpmio/rpmlog.h
2.56.4.8+6  -14 rpm/rpmio/rpmmacro.h
1.1.2.2 +1  -1  rpm/rpmio/rpmmrb.h
2.9.2.1 +1  -1  rpm/rpmio/rpmperl.h
2.108.2.15  +3  -0  rpm/rpmio/rpmpgp.h
2.10.2.2+2  -2  rpm/rpmio/rpmpython.h
2.10.2.1+1  -1  rpm/rpmio/rpmruby.h
1.14.6.3+1  -0  rpm/rpmio/rpmsq.h
2.59.2.13   +117 -121   rpm/rpmio/rpmsql.c
2.27.4.8+13 -13 rpm/rpmio/rpmsql.h
2.6.2.2 +2  -2  rpm/rpmio/rpmsquirrel.h
2.1.2.5 +7  -0  rpm/rpmio/rpmsvn.c
2.20.4.1+2  -2  rpm/rpmio/rpmsw.c
2.12.4.3+3  -3  rpm/rpmio/rpmsw.h
2.13.2.1+2  -2  rpm/rpmio/rpmtcl.h
1.5.2.20+4  -4  rpm/rpmio/rpmtpm.c
1.1.2.1 +118 -0 rpm/rpmio/rpmutil.h
2.15.4.1+1  -0  rpm/rpmio/rpmxar.h
1.3.10.1+2  -2  rpm/rpmio/salsa10.h
1.3.10.1+2  -2  rpm/rpmio/salsa20.h
1.4.8.2 +2  -2  rpm/rpmio/tar.h
1.3.10.1+2  -2  rpm/rpmio/tiger.h
2.6.2.4 +2  -0  rpm/rpmio/ttpm.c
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.37 -r1.293.2.38 Makefile.am
  --- rpm/rpmio/Makefile.am 21 Sep 2014 06:52:53 -  1.293.2.37
  +++ rpm/rpmio/Makefile.am 27 Sep 2014 15:51:21 -  1.293.2.38
  @@ -118,7 +118,8 @@
   
   pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
   pkginc_HEADERS = argv.h mire.h rpmzlog.h yarn.h \
  - rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h rpmpgp.h 
rpmsw.h
  + rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h
  + rpmpgp.h rpmsw.h rpmutil.h
   noinst_HEADERS = \
ar.h bson.h cpio.h crc.h envvar.h fnmatch.h fts.h glob.h iosm.h \
blake2.h blake2-impl.h blake2-rpm.h blake2-kat.h \
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/ar.h
  
  $ cvs diff -u -r1.5 -r1.5.8.1 ar.h
  --- rpm/rpmio/ar.h10 Mar 2008 21:18:07 -  1.5
  +++ rpm/rpmio/ar.h27 Sep 2014 15:51:21 -  1.5.8.1
  @@ -37,7 +37,7 @@
   /**
* Read ar(1) header.
* @retval _iosm file path and stat info
  - * @retval st
  + * @param st stat(2) buffer
* @return   0 on success
*/
   int arHeaderRead(void * _iosm, struct stat * st)
  @@ -46,8 +46,8 @@
   
   /**
* Write ar(1) header.
  - * @retval _iosm

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

2014-09-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-Sep-2014 08:52:54
  Branch: rpm-5_4  Handle: 2014092106525300

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   rpmsed.c rpmsed.h trel.c
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am librpmio.vers

  Log:
- rpmsed: create.

  Summary:
RevisionChanges Path
1.293.2.37  +14 -6  rpm/rpmio/Makefile.am
2.199.2.44  +14 -0  rpm/rpmio/librpmio.vers
1.1.2.1 +427 -0 rpm/rpmio/rpmsed.c
1.1.2.1 +148 -0 rpm/rpmio/rpmsed.h
1.1.2.1 +60 -0  rpm/rpmio/trel.c
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.36 -r1.293.2.37 Makefile.am
  --- rpm/rpmio/Makefile.am 18 Sep 2014 05:07:01 -  1.293.2.36
  +++ rpm/rpmio/Makefile.am 21 Sep 2014 06:52:53 -  1.293.2.37
  @@ -7,24 +7,24 @@
   
   SUBDIRS = auto # tests
   
  -EXTRA_DIST = \
  +EXTRA_DIST = librpmio.vers \
fnmatch_loop.c 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 \
tdir.c tfts.c tget.c tgit.c tglob.c thkp.c thtml.c tinv.c tkey.c \
tmire.c todbc.c tput.c tpython.c trpmio.c tsexp.c tsvn.c tsw.c tybi.c \
  - lookup3.c librpmio.vers testit.sh
  + lookup3.c testit.sh
   
   EXTRA_PROGRAMS = rpmcpio rpmdpkg rpmtar rpmz
   EXTRA_PROGRAMS += bdes thtml tinv tkey tmacro tpw
   noinst_PROGRAMS =
   
  -EXTRA_PROGRAMS += bsdiff bspatch rpmborg rpmcurl \
  +EXTRA_PROGRAMS += bsdiff bspatch pcrsed rpmborg rpmcurl \
rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \
rpmpbzip2 rpmpigz \
tasn tbf tder tdir tfts tget tglob thkp tmagic \
tmire todbc toid tperl tpython tput trpmio tsexp tsvn tsw ttcl tybi \
  - dumpasn1 lookup3
  + dumpasn1 lookup3 trel
   
   noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp
   if WITH_LIBGIT2
  @@ -126,12 +126,12 @@
groestl.h hamsi.h jh.h keccak.h lane.h luffa.h md2.h md6.h mongo.h \
radiogatun.h \
salsa10.h salsa20.h shabal.h shavite3.h simd.h skein.h tib3.h tiger.h \
  - poptIO.h rpmacl.h rpmasn.h rpmaug.h rpmbag.h rpmbc.h rpmbz.h \
  + pcrs.h poptIO.h rpmacl.h rpmasn.h rpmaug.h rpmbag.h rpmbc.h rpmbz.h \
rpmcdsa.h rpmct.h rpmcudf.h rpmcvs.h rpmdate.h rpmdav.h rpmdir.h 
rpmficl.h rpmgc.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 rpmmg.h rpmmrb.h rpmnix.h rpmnss.h \
  - rpmodbc.h rpmperl.h rpmpython.h rpmruby.h rpmsm.h rpmsp.h \
  + rpmodbc.h rpmperl.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 \
rpmtcl.h rpmtpm.h rpmurl.h rpmuuid.h rpmxar.h rpmz.h rpmzq.h \
set.h tar.h ugid.h rpmio-stub.h
  @@ -166,6 +166,7 @@
mire.c \
mongo.c \
mount.c \
  + pcrs.c \
poptIO.c \
rpmacl.c \
rpmasn.c \
  @@ -201,6 +202,7 @@
rpmpython.c \
rpmrpc.c \
rpmruby.c \
  + rpmsed.c \
rpmsm.c \
rpmsp.c \
rpmsq.c \
  @@ -399,6 +401,9 @@
   bspatch_SOURCES = bspatch.c
   bspatch_LDADD = $(RPMIO_LDADD_COMMON)
   
  +pcrsed_SOURCES = pcrsed.c
  +pcrsed_LDADD = $(RPMIO_LDADD_COMMON)
  +
   rpmborg_SOURCES = rpmborg.c
   rpmborg_LDADD = $(RPMIO_LDADD_COMMON)
   
  @@ -524,6 +529,9 @@
   tpw_SOURCES = tpw.c
   tpw_LDADD = $(RPM_LDADD_COMMON) $(RPMIO_LDADD_COMMON)
   
  +trel_SOURCES = trel.c
  +trel_LDADD = $(RPMIO_LDADD_COMMON)
  +
   trpmio_SOURCES = trpmio.c
   trpmio_LDADD = $(RPMIO_LDADD_COMMON)
   
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/librpmio.vers
  
  $ cvs diff -u -r2.199.2.43 -r2.199.2.44 librpmio.vers
  --- rpm/rpmio/librpmio.vers   19 Sep 2014 19:26:21 -  2.199.2.43
  +++ rpm/rpmio/librpmio.vers   21 Sep 2014 06:52:53 -  2.199.2.44
  @@ -263,6 +263,13 @@
   _Open;
   Opendir;
   _Opendir;
  +pcrs_compile;
  +pcrs_compile_command;
  +pcrs_execute;
  +pcrs_execute_list;
  +pcrs_free_job;
  +pcrs_free_joblist;
  +pcrs_strerror;
   pgpArmorKeyTbl;
   pgpArmorTbl;
   pgpArmorUnwrap;
  @@ -661,6 +668,12 @@
   rpmrubyNew;
   rpmrubyRun;
   rpmrubyRunFile;
  +_rpmsedPool;
  +

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

2014-08-17 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:   17-Aug-2014 16:29:22
  Branch: rpm-5_4  Handle: 2014081714292100

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

  Log:
- include additional files mentioned in POTFILES.in.

  Summary:
RevisionChanges Path
1.293.2.33  +2  -2  rpm/rpmio/Makefile.am
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.32 -r1.293.2.33 Makefile.am
  --- rpm/rpmio/Makefile.am 8 Aug 2014 22:33:28 -   1.293.2.32
  +++ rpm/rpmio/Makefile.am 17 Aug 2014 14:29:21 -  1.293.2.33
  @@ -8,8 +8,8 @@
   SUBDIRS = auto # tests
   
   EXTRA_DIST = \
  - fnmatch_loop.c getdate.y rpmcpio.c rpmcpio.h \
  - rpmgenbasedir.c rpmgenpkglist.c rpmgensrclist.c \
  + fnmatch_loop.c 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 \
tdir.c tfts.c tget.c tgit.c tglob.c thkp.c thtml.c tinv.c tkey.c \
tmire.c todbc.c tput.c tpython.c trpmio.c tsexp.c tsvn.c tsw.c tybi.c \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


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

2014-08-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:   09-Aug-2014 00:33:29
  Branch: rpm-5_4  Handle: 2014080822332800

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

  Log:
- java: fix: unwire the hardwired linkage hack.

  Summary:
RevisionChanges Path
1.293.2.32  +0  -1  rpm/rpmio/Makefile.am
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.31 -r1.293.2.32 Makefile.am
  --- rpm/rpmio/Makefile.am 6 Aug 2014 20:42:35 -   1.293.2.31
  +++ rpm/rpmio/Makefile.am 8 Aug 2014 22:33:28 -   1.293.2.32
  @@ -92,7 +92,6 @@
   RPMIO_LDADD_COMMON = \
librpmio.la \
$(top_builddir)/misc/librpmmisc.la \
  - -L/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server 
-ljvm \
@LTLIBICONV@ \
@LTLIBINTL@
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am radiogatun.c radiogatun.h

2013-11-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-Nov-2013 16:53:01
  Branch: rpm-5_4  Handle: 201311031553

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   radiogatun.c radiogatun.h
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am

  Log:
- radiogatun: stub in reference code.

  Summary:
RevisionChanges Path
1.293.2.26  +1  -1  rpm/rpmio/Makefile.am
1.1.2.1 +138 -0 rpm/rpmio/radiogatun.c
1.1.2.1 +20 -0  rpm/rpmio/radiogatun.h
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.25 -r1.293.2.26 Makefile.am
  --- rpm/rpmio/Makefile.am 1 Nov 2013 14:51:29 -   1.293.2.25
  +++ rpm/rpmio/Makefile.am 3 Nov 2013 15:53:00 -   1.293.2.26
  @@ -129,7 +129,7 @@
getdate.c \
blake2b.c blake2bp.c blake2s.c blake2sp.c blake2-rpm.c \
arirang.c blake.c bmw.c chi.c cubehash.c echo.c edon-r.c fugue.c \
  - groestl.c hamsi.c jh.c keccak.c lane.c luffa.c md2.c md6.c \
  + 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.c rpmjsio.c rpmkeyring.c \
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/radiogatun.c
  
  $ cvs diff -u -r0 -r1.1.2.1 radiogatun.c
  --- /dev/null 2013-11-03 16:47:02.0 +0100
  +++ radiogatun.c  2013-11-03 16:53:01.619838284 +0100
  @@ -0,0 +1,138 @@
  +/* RadioGatún reference code
  + * Public domain
  + * For more information on RadioGatún, please refer to 
  + * http://radiogatun.noekeon.org/
  +*/
  +
  +#include system.h
  +
  +#include radiogatun.h
  +
  +#include debug.h
  +
  +/*  fastradiogatun.macros */
  +#define ROR(a, b, word_size) (((a)  ((b)%word_size)) | ((a)  
((word_size-((b)%word_size))%word_size)))
  +
  +#define roundmacro(a, b, Bptr, word_size)  \
  + { \
  +   b[(3*((Bptr )%13))  ] ^= a[ 1] ^ in[INptr  ]; \
  +   b[(3*((Bptr +  1)%13))+1] ^= a[ 2]; \
  +   b[(3*((Bptr +  2)%13))+2] ^= a[ 3]; \
  +   b[(3*((Bptr +  3)%13))  ] ^= a[ 4]; \
  +   b[(3*((Bptr +  4)%13))+1] ^= a[ 5]; \
  +   b[(3*((Bptr +  5)%13))+2] ^= a[ 6]; \
  +   b[(3*((Bptr +  6)%13))  ] ^= a[ 7]; \
  +   b[(3*((Bptr +  7)%13))+1] ^= a[ 8]; \
  +   b[(3*((Bptr +  8)%13))+2] ^= a[ 9]; \
  +   b[(3*((Bptr +  9)%13))  ] ^= a[10]; \
  +   b[(3*((Bptr + 10)%13))+1] ^= a[11]; \
  +   b[(3*((Bptr + 11)%13))+2] ^= a[12]; \
  +   a[16] ^= in[INptr  ]; \
  +   a[17] ^= in[INptr+1]; \
  +   b[(3*Bptr)+1] ^= in[INptr+1]; \
  +   a[18] ^= in[INptr+2]; \
  +   b[(3*Bptr)+2] ^= in[INptr+2]; \
  +   A[ 0] = ROR(a[ 0]^(a[ 1]|(~a[ 2])),  0, word_size); \
  +   A[ 1] = ROR(a[ 1]^(a[ 2]|(~a[ 3])), 66, word_size); \
  +   A[ 2] = ROR(a[ 2]^(a[ 3]|(~a[ 4])),  6, word_size); \
  +   A[ 3] = ROR(a[ 3]^(a[ 4]|(~a[ 5])),105, word_size); \
  +   A[ 4] = ROR(a[ 4]^(a[ 5]|(~a[ 6])), 21, word_size); \
  +   A[ 5] = ROR(a[ 5]^(a[ 6]|(~a[ 7])),153, word_size); \
  +   A[ 6] = ROR(a[ 6]^(a[ 7]|(~a[ 8])), 45, word_size); \
  +   A[ 7] = ROR(a[ 7]^(a[ 8]|(~a[ 9])),  1, word_size); \
  +   A[ 8] = ROR(a[ 8]^(a[ 9]|(~a[10])), 78, word_size); \
  +   A[ 9] = ROR(a[ 9]^(a[10]|(~a[11])), 10, word_size); \
  +   A[10] = ROR(a[10]^(a[11]|(~a[12])),120, word_size); \
  +   A[11] = ROR(a[11]^(a[12]|(~a[13])), 28, word_size); \
  +   A[12] = ROR(a[12]^(a[13]|(~a[14])),171, word_size); \
  +   A[13] = ROR(a[13]^(a[14]|(~a[15])), 55, word_size); \
  +   A[14] = ROR(a[14]^(a[15]|(~a[16])),  3, word_size); \
  +   A[15] = ROR(a[15]^(a[16]|(~a[17])), 91, word_size); \
  +   A[16] = ROR(a[16]^(a[17]|(~a[18])), 15, word_size); \
  +   A[17] = ROR(a[17]^(a[18]|(~a[ 0])),136, word_size); \
  +   A[18] = ROR(a[18]^(a[ 0]|(~a[ 1])), 36, word_size); \
  +   a[ 0] = A[ 0]^A[ 7]^A[ 9] ^ 1; \
  +   a[ 1] = A[ 7]^A[14]^A[16]; \
  +   a[ 2] = A[14]^A[ 2]^A[ 4]; \
  +   a[ 3] = A[ 2]^A[ 9]^A[11]; \
  +   a[ 4] = A[ 9]^A[16]^A[18]; \
  +   a[ 5] = A[16]^A[ 4]^A[ 6]; \
  +   a[ 6] = A[ 4]^A[11]^A[13]; \
  +   a[ 7] = A[11]^A[18]^A[ 1]; \
  +   a[ 8] = A[18]^A[ 6]^A[ 8]; \
  +   a[ 9] = A[ 6]^A[13]^A[15]; \
  +   a[10] = A[13]^A[ 1]^A[ 3]; \
  +   a[11] = A[ 1]^A[ 8]^A[10]; \
  +   a[12] = A[ 8]^A[15]^A[17]; \
  +   a[13] = A[15]^A[ 3]^A[ 5] ^ b[(3*((Bptr+12)%13))  ]; \
  +   a[14] = A[ 3]^A[10]^A[12] ^ b[(3*((Bptr+12)%13))+1]; \
  +   a[15] = A[10]^A[17]^A[ 0] ^ 

[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am blake2-impl.h blake2.h blak...

2013-10-28 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:   29-Oct-2013 00:47:34
  Branch: rpm-5_4  Handle: 2013102823473200

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   blake2-impl.h blake2.h blake2b.c blake2bp.c
blake2s.c blake2sp.c
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am

  Log:
- blake2: add blake2_code_20130131/ref routines.

  Summary:
RevisionChanges Path
1.293.2.23  +2  -0  rpm/rpmio/Makefile.am
1.1.2.1 +133 -0 rpm/rpmio/blake2-impl.h
1.1.2.1 +156 -0 rpm/rpmio/blake2.h
1.1.2.1 +391 -0 rpm/rpmio/blake2b.c
1.1.2.1 +288 -0 rpm/rpmio/blake2bp.c
1.1.2.1 +380 -0 rpm/rpmio/blake2s.c
1.1.2.1 +295 -0 rpm/rpmio/blake2sp.c
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.22 -r1.293.2.23 Makefile.am
  --- rpm/rpmio/Makefile.am 21 Sep 2013 17:54:44 -  1.293.2.22
  +++ rpm/rpmio/Makefile.am 28 Oct 2013 23:47:32 -  1.293.2.23
  @@ -108,6 +108,7 @@
rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h rpmpgp.h 
rpmsw.h
   noinst_HEADERS = \
ar.h bson.h cpio.h crc.h envvar.h fnmatch.h fts.h glob.h iosm.h \
  + blake2.h blake2-impl.h \
arirang.h blake.h bmw.h chi.h cubehash.h echo.h edon-r.h fugue.h \
groestl.h hamsi.h jh.h keccak.h lane.h luffa.h md2.h md6.h mongo.h \
salsa10.h salsa20.h shabal.h shavite3.h simd.h skein.h tib3.h tiger.h \
  @@ -125,6 +126,7 @@
   
   librpmio_la_SOURCES = \
getdate.c \
  + blake2b.c blake2bp.c blake2s.c blake2sp.c \
arirang.c blake.c bmw.c chi.c cubehash.c echo.c edon-r.c fugue.c \
groestl.c hamsi.c jh.c keccak.c lane.c luffa.c md2.c md6.c \
salsa10.c salsa20.c shabal.c shavite3.c simd.c skein.c tib3.c tiger.c \
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/blake2-impl.h
  
  $ cvs diff -u -r0 -r1.1.2.1 blake2-impl.h
  --- /dev/null 2013-10-29 00:46:23.0 +0100
  +++ blake2-impl.h 2013-10-29 00:47:33.286616163 +0100
  @@ -0,0 +1,133 @@
  +/*
  +   BLAKE2 reference source code package - reference C implementations
  +
  +   Written in 2012 by Samuel Neves sne...@dei.uc.pt
  +
  +   To the extent possible under law, the author(s) have dedicated all 
copyright
  +   and related and neighboring rights to this software to the public domain
  +   worldwide. This software is distributed without any warranty.
  +
  +   You should have received a copy of the CC0 Public Domain Dedication along 
with
  +   this software. If not, see 
http://creativecommons.org/publicdomain/zero/1.0/.
  +*/
  +#pragma once
  +#ifndef __BLAKE2_IMPL_H__
  +#define __BLAKE2_IMPL_H__
  +
  +#include stdint.h
  +
  +static inline uint32_t load32( const void *src )
  +{
  +#if defined(NATIVE_LITTLE_ENDIAN)
  +  return *( uint32_t * )( src );
  +#else
  +  const uint8_t *p = ( uint8_t * )src;
  +  uint32_t w = *p++;
  +  w |= ( uint32_t )( *p++ )   8;
  +  w |= ( uint32_t )( *p++ )  16;
  +  w |= ( uint32_t )( *p++ )  24;
  +  return w;
  +#endif
  +}
  +
  +static inline uint64_t load64( const void *src )
  +{
  +#if defined(NATIVE_LITTLE_ENDIAN)
  +  return *( uint64_t * )( src );
  +#else
  +  const uint8_t *p = ( uint8_t * )src;
  +  uint64_t w = *p++;
  +  w |= ( uint64_t )( *p++ )   8;
  +  w |= ( uint64_t )( *p++ )  16;
  +  w |= ( uint64_t )( *p++ )  24;
  +  w |= ( uint64_t )( *p++ )  32;
  +  w |= ( uint64_t )( *p++ )  40;
  +  w |= ( uint64_t )( *p++ )  48;
  +  w |= ( uint64_t )( *p++ )  56;
  +  return w;
  +#endif
  +}
  +
  +static inline void store32( void *dst, uint32_t w )
  +{
  +#if defined(NATIVE_LITTLE_ENDIAN)
  +  *( uint32_t * )( dst ) = w;
  +#else
  +  uint8_t *p = ( uint8_t * )dst;
  +  *p++ = ( uint8_t )w; w = 8;
  +  *p++ = ( uint8_t )w; w = 8;
  +  *p++ = ( uint8_t )w; w = 8;
  +  *p++ = ( uint8_t )w;
  +#endif
  +}
  +
  +static inline void store64( void *dst, uint64_t w )
  +{
  +#if defined(NATIVE_LITTLE_ENDIAN)
  +  *( uint64_t * )( dst ) = w;
  +#else
  +  uint8_t *p = ( uint8_t * )dst;
  +  *p++ = ( uint8_t )w; w = 8;
  +  *p++ = ( uint8_t )w; w = 8;
  +  *p++ = ( uint8_t )w; w = 8;
  +  *p++ = ( uint8_t )w; w = 8;
  +  *p++ = ( uint8_t )w; w = 8;
  +  *p++ = ( uint8_t )w; w = 8;
  +  *p++ = ( uint8_t )w; w = 8;
  +  *p++ = ( uint8_t )w;
  +#endif
  +}
  +
  +static inline uint64_t load48( const void *src )
  +{
  +  const uint8_t *p 

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

2012-04-01 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-Apr-2012 23:09:17
  Branch: rpm-5_4  Handle: 2012040121091700

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

  Log:
- rpmio: fix: missing escape typo.

  Summary:
RevisionChanges Path
1.293.2.16  +1  -1  rpm/rpmio/Makefile.am
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.15 -r1.293.2.16 Makefile.am
  --- rpm/rpmio/Makefile.am 25 Mar 2012 22:01:11 -  1.293.2.15
  +++ rpm/rpmio/Makefile.am 1 Apr 2012 21:09:17 -   1.293.2.16
  @@ -126,7 +126,7 @@
   endif
   librpmio_la_LIBADD = -lm
   if ENABLE_BUILD_INTLIBDEP
  -librpmio_la_LIBADD +=
  +librpmio_la_LIBADD += \
$(top_builddir)/misc/librpmmisc.la
   endif
   if ENABLE_BUILD_MAXEXTLIBDEP
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am set.c

2012-03-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:   25-Mar-2012 19:07:40
  Branch: rpm-5_4  Handle: 2012032517074000

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am set.c

  Log:
- set: build tset always.

  Summary:
RevisionChanges Path
1.293.2.13  +3  -3  rpm/rpmio/Makefile.am
1.1.2.3 +27 -1  rpm/rpmio/set.c
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.12 -r1.293.2.13 Makefile.am
  --- rpm/rpmio/Makefile.am 25 Mar 2012 16:55:11 -  1.293.2.12
  +++ rpm/rpmio/Makefile.am 25 Mar 2012 17:07:40 -  1.293.2.13
  @@ -20,10 +20,10 @@
rpmgenbasedir rpmgenpkglist rpmgensrclist rpmgpg \
rpmpbzip2 rpmpigz rpmtar rpmz \
tasn tdir tfts tget tglob thkp thtml tinv tkey tmacro tmagic \
  - tmire todbc tperl tpython tput tpw trpmio tset tsexp tsvn tsw ttcl \
  + tmire todbc tperl tpython tput tpw trpmio tsexp tsvn tsw ttcl \
dumpasn1 lookup3
   
  -noinst_PROGRAMS =
  +noinst_PROGRAMS = tset
   if WITH_LIBGIT2
   noinst_PROGRAMS += tgit
   else
  @@ -394,7 +394,7 @@
   trpmio_LDADD = $(RPMIO_LDADD_COMMON)
   
   tset_SOURCES = set.c
  -tset_CFLAGS  = $(CFLAGS) -DSELF_TEST -Wmissing-field-initializers
  +tset_CFLAGS  = $(CFLAGS) -DSELF_TEST -Wno-override-init --std=c99
   tset_LDFLAGS = $(RPMIO_LDADD_COMMON)
   
   tsexp_SOURCES = tsexp.c
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/set.c
  
  $ cvs diff -u -r1.1.2.2 -r1.1.2.3 set.c
  --- rpm/rpmio/set.c   25 Mar 2012 16:55:11 -  1.1.2.2
  +++ rpm/rpmio/set.c   25 Mar 2012 17:07:40 -  1.1.2.3
  @@ -9,11 +9,19 @@
   #include system.h
   
   #include rpmiotypes.h
  +#ifdef SELF_TEST
  +#include poptIO.h
  +#endif
  +
   #define  _SET_INTERNAL
   #include set.h
   
   #include debug.h
   
  +int _rpmset_debug = -1;
  +
  +/*==*/
  +
   /*
* Base62 routines - encode bits with alnum characters.
*
  @@ -1386,8 +1394,23 @@
   #endif
   
   #ifdef SELF_TEST
  +/*==*/
  +static struct poptOption rpmsetOptionsTable[] = {
  + { debug, 'd', POPT_ARG_VAL,   _rpmset_debug, -1, NULL, 
NULL },
  +
  + { NULL, '\0', POPT_ARG_INCLUDE_TABLE, rpmioAllPoptTable, 0,
  +N_(Common options for all rpmio executables:), NULL },
  +
  +  POPT_AUTOALIAS
  +  POPT_AUTOHELP
  +  POPT_TABLEEND
  +};
  +
   int main(int argc, char *argv[])
   {
  +poptContext con = rpmioInit(argc, argv, rpmsetOptionsTable);
  +int rc = 0;
  +
   test_base62();
   test_golomb();
   test_word_table();
  @@ -1395,7 +1418,10 @@
   test_delta();
   test_set();
   test_api();
  -return 0;
  +
  +con = rpmioFini(con);
  +return rc;
   }
   #endif
  +
   // ex: set ts=8 sts=4 sw=4 noet:
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ Makefile.am poptIO.c rpmio.c rpmodbc.c ...

2012-03-17 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:   17-Mar-2012 16:53:16
  Branch: rpm-5_4  Handle: 2012031715531500

  Added files:  (Branch: rpm-5_4)
rpm/rpmio   rpmodbc.c rpmodbc.h
  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   Makefile.am poptIO.c rpmio.c

  Log:
- odbc: stub in a ctor/dtor.

  Summary:
RevisionChanges Path
1.293.2.8   +2  -2  rpm/rpmio/Makefile.am
1.94.2.2+3  -0  rpm/rpmio/poptIO.c
1.230.2.4   +3  -0  rpm/rpmio/rpmio.c
1.1.2.1 +56 -0  rpm/rpmio/rpmodbc.c
1.1.2.1 +84 -0  rpm/rpmio/rpmodbc.h
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.7 -r1.293.2.8 Makefile.am
  --- rpm/rpmio/Makefile.am 10 Mar 2012 16:15:36 -  1.293.2.7
  +++ rpm/rpmio/Makefile.am 17 Mar 2012 15:53:15 -  1.293.2.8
  @@ -92,7 +92,7 @@
rpmcdsa.h rpmcudf.h rpmcvs.h rpmdav.h rpmdir.h rpmficl.h rpmgc.h 
rpmgit.h rpmhash.h \
rpmhkp.h rpmhook.h rpmio_internal.h rpmjs.h rpmjsio.h rpmkeyring.h \
rpmku.h rpmltc.h rpmlua.h rpmmg.h rpmnix.h rpmnss.h \
  - rpmperl.h rpmpython.h rpmruby.h rpmsm.h rpmsp.h \
  + rpmodbc.h rpmperl.h rpmpython.h rpmruby.h rpmsm.h rpmsp.h \
rpmsq.h rpmsql.h rpmsquirrel.h rpmssl.h rpmsvn.h rpmsx.h rpmsyck.h \
rpmtcl.h rpmtpm.h rpmurl.h rpmuuid.h rpmxar.h rpmz.h rpmzq.h \
tar.h ugid.h rpmio-stub.h
  @@ -111,7 +111,7 @@
rpmhash.c rpmhkp.c rpmhook.c rpmio.c rpmiob.c rpmio-stub.c \
rpmjs.c rpmjsio.c rpmkeyring.c rpmku.c \
rpmlog.c rpmltc.c rpmlua.c rpmmalloc.c rpmmg.c rpmnix.c rpmnss.c \
  - rpmperl.c rpmpgp.c rpmpython.c rpmrpc.c rpmruby.c rpmsm.c rpmsp.c \
  + rpmodbc.c rpmperl.c rpmpgp.c rpmpython.c rpmrpc.c rpmruby.c rpmsm.c 
rpmsp.c \
rpmsq.c rpmsql.c rpmsquirrel.c rpmssl.c rpmsvn.c rpmsw.c rpmsx.c \
rpmsyck.c rpmtcl.c rpmtpm.c rpmuuid.c rpmxar.c rpmzlog.c rpmzq.c \
strcasecmp.c strtolocale.c tar.c url.c ugid.c xzdio.c yarn.c
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/poptIO.c
  
  $ cvs diff -u -r1.94.2.1 -r1.94.2.2 poptIO.c
  --- rpm/rpmio/poptIO.c10 Mar 2012 17:41:15 -  1.94.2.1
  +++ rpm/rpmio/poptIO.c17 Mar 2012 15:53:15 -  1.94.2.2
  @@ -40,6 +40,7 @@
   #include rpmhkp.h
   #include rpmjs.h
   #include rpmnix.h
  +#include rpmodbc.h
   #include rpmperl.h
   #include rpmpython.h
   #include rpmruby.h
  @@ -663,6 +664,8 @@
N_(Debug Mongo DB connection), NULL},
{ nixdebug, '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, _rpmnix_debug, 
-1,
N_(Debug embedded Nix interpreter), NULL},
  + { rpmodbcdebug, '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, 
_rpmodbc_debug, -1,
  + N_(Debug embedded ODBC interface), NULL},
{ rpmperldebug, '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, 
_rpmperl_debug, -1,
N_(Debug embedded Perl interpreter), NULL},
{ rpmpythondebug, '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, 
_rpmpython_debug, -1,
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmio.c
  
  $ cvs diff -u -r1.230.2.3 -r1.230.2.4 rpmio.c
  --- rpm/rpmio/rpmio.c 9 Mar 2012 23:14:03 -   1.230.2.3
  +++ rpm/rpmio/rpmio.c 17 Mar 2012 15:53:15 -  1.230.2.4
  @@ -72,6 +72,7 @@
   #include rpmjs.h
   #include rpmlua.h  /* XXX rpmioClean() calls rpmluaFree() */
   #include rpmnix.h
  +#include rpmodbc.h
   #include rpmperl.h
   #include rpmpython.h
   #include rpmruby.h
  @@ -3245,6 +3246,7 @@
   #ifdef   NOTYET
   extern rpmioPool _rpmnixPool;
   #endif
  +extern rpmioPool _rpmodbcPool;
   extern rpmioPool _rpmperlPool;
   extern rpmioPool _rpmpythonPool;
   extern rpmioPool _rpmrubyPool;
  @@ -3293,6 +3295,7 @@
   _rpmbagPool = rpmioFreePool(_rpmbagPool);
   _rpmcvsPool = rpmioFreePool(_rpmcvsPool);
   _rpmgitPool = rpmioFreePool(_rpmgitPool);
  +_rpmodbcPool = rpmioFreePool(_rpmodbcPool);
   _rpmsvnPool = rpmioFreePool(_rpmsvnPool);
   _rpmtpmPool = rpmioFreePool(_rpmtpmPool);
   
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmodbc.c
  
  $ cvs diff -u -r0 -r1.1.2.1 rpmodbc.c
  --- /dev/null 2012-03-17 16:45:29.0 +0100
  +++ rpmodbc.c 2012-03-17 16:53:16.061331748 +0100
  @@ -0,0 +1,56 @@
  +/** \ingroup rpmio
  + * \file 

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

2010-12-14 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   15-Dec-2010 03:34:28
  Branch: rpm-5_4  Handle: 2010121502342700

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

  Log:
install argv.h header on system as it's required by rpmgi.h

  Summary:
RevisionChanges Path
1.293.2.2   +2  -2  rpm/rpmio/Makefile.am
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.1 -r1.293.2.2 Makefile.am
  --- rpm/rpmio/Makefile.am 9 Dec 2010 20:44:14 -   1.293.2.1
  +++ rpm/rpmio/Makefile.am 15 Dec 2010 02:34:27 -  1.293.2.2
  @@ -74,10 +74,10 @@
   #pkglib_LTLIBRARIES = libsqlio.la
   
   pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
  -pkginc_HEADERS = mire.h rpmzlog.h yarn.h \
  +pkginc_HEADERS = argv.h mire.h rpmzlog.h yarn.h \
rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h rpmpgp.h 
rpmsw.h
   noinst_HEADERS = \
  - argv.h ar.h bson.h cpio.h crc.h envvar.h fnmatch.h fts.h glob.h iosm.h \
  + ar.h bson.h cpio.h crc.h envvar.h fnmatch.h fts.h glob.h iosm.h \
arirang.h blake.h bmw.h chi.h cubehash.h echo.h edon-r.h fugue.h \
groestl.h hamsi.h jh.h keccak.h lane.h luffa.h md2.h md6.h mongo.h \
salsa10.h salsa20.h shabal.h shavite3.h simd.h skein.h tib3.h tiger.h \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org