[iwhd] maint: customize to enable/accommodate tight-scope syntax check
by Jim Meyering
commit 65904c8ab2862ea1225cbcbee09e14c748d3ea95
Author: Jim Meyering <meyering(a)redhat.com>
Date: Mon May 9 17:54:40 2011 +0200
maint: customize to enable/accommodate tight-scope syntax check
* cfg.mk (_gl_TS_dir): Define.
Define other _gl_TS* variables to detect/exempt globals.
* Makefile.am (iwhd_SOURCES): Move .h file names from here to ...
(noinst_HEADERS): ...here.
For convenience, since the tight-scope rule uses $(noinst_HEADERS).
Makefile.am | 18 ++++++++++--------
cfg.mk | 22 ++++++++++++++++++++++
2 files changed, 32 insertions(+), 8 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index a0a3c52..76a1c64 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,22 +39,24 @@ MAINTAINERCLEANFILES =
iwhd_SOURCES = \
auto.c \
backend.c \
- backend.h \
- gc-wrap.h \
- iwh.h \
meta.cpp \
- meta.h \
mpipe.c \
- mpipe.h \
replica.c \
- replica.h \
qparser.y \
- query.h \
rest.c \
setup.c \
+ template.c
+
+noinst_HEADERS = \
+ backend.h \
+ gc-wrap.h \
+ iwh.h \
+ meta.h \
+ mpipe.h \
+ query.h \
+ replica.h \
setup.h \
state_defs.h \
- template.c \
template.h
EXTRA_iwhd_SOURCES = qlexer.l
diff --git a/cfg.mk b/cfg.mk
index a13d933..5554fee 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -78,3 +78,25 @@ url_dir_list = http://people.redhat.com/$(USER)/$(PACKAGE)
# Make the distcheck-emitted gnupload command use the right URL.
gnu_rel_host = people.redhat.com
upload_dest_dir_ = public_html/$(PACKAGE)
+
+# Tell the tight_scope rule that sources are in ".".
+export _gl_TS_dir = .
+
+# Tell the tight_scope rule that yacc-related yy* names
+# and "_Z"-prefixed C++ mangled names are all "extern".
+export _gl_TS_unmarked_extern_functions = main usage yy.* _Z.*
+
+# Also deduce that "verbose" is global.
+# It's declared/defined via this: GLOBAL(int, verbose, 0);
+export _gl_TS_var_match = \
+ /^(?:extern|XTERN) .*?\**(\w+)(\[.*?\])?;/ || /\bGLOBAL\(.*?,\s*(.*?),/
+
+# List these _tbl variables, to exempt them for now.
+export _gl_TS_unmarked_extern_vars = version_etc_copyright \
+ bad_func_tbl \
+ cf_func_tbl \
+ curl_func_tbl \
+ fs_condor_func_tbl \
+ fs_func_tbl \
+ fs_rhevm_func_tbl \
+ s3_func_tbl
12 years, 11 months
[iwhd] maint: prepare for the tight-scope check: mark as extern
by Jim Meyering
commit ea850f1d08fbf4daca945df82ade57a17fa392a8
Author: Jim Meyering <meyering(a)redhat.com>
Date: Mon May 9 17:53:33 2011 +0200
maint: prepare for the tight-scope check: mark as extern
Mark all deliberately-public C functions with "extern":
* backend.h: Likewise.
* iwh.h: Likewise.
* meta.h: Likewise.
* mpipe.h: Likewise.
* query.h: Likewise.
* replica.h: Likewise.
* setup.h: Likewise.
* template.h: Likewise.
backend.h | 2 +-
iwh.h | 2 +-
meta.h | 38 +++++++++++++++++++-------------------
mpipe.h | 26 +++++++++++++-------------
query.h | 8 ++++----
replica.h | 16 ++++++++--------
setup.h | 36 ++++++++++++++++++------------------
template.h | 44 ++++++++++++++++++++++----------------------
8 files changed, 86 insertions(+), 86 deletions(-)
---
diff --git a/backend.h b/backend.h
index 3022500..cc44668 100644
--- a/backend.h
+++ b/backend.h
@@ -48,6 +48,6 @@ typedef struct {
#define THREAD_FAILED ((void *)(-1))
-void backend_init (void);
+extern void backend_init (void);
#endif
diff --git a/iwh.h b/iwh.h
index 853cde5..e4a7c28 100644
--- a/iwh.h
+++ b/iwh.h
@@ -68,7 +68,7 @@ GLOBAL(const char *, me, "here");
#define AUTO_MONGOD_LOG "_mongod.log"
#define AUTO_MONGOD_PORT 27018
-int auto_start (int dbport);
+extern int auto_start (int dbport);
#include <locale.h>
#include "gettext.h"
diff --git a/meta.h b/meta.h
index 130b4b4..bee8317 100644
--- a/meta.h
+++ b/meta.h
@@ -22,25 +22,25 @@ extern "C" {
enum { QUERY_BKT_LIST, QUERY_OBJ_LIST, QUERY_FILTER };
-void meta_init (void);
-void meta_fini (void);
-char *meta_did_put (const char *bucket, const char *key, const char *loc,
- size_t size);
-void meta_got_copy (const char *bucket, const char *key, const char *loc);
-char *meta_has_copy (const char *bucket, const char *key, const char *loc);
-int meta_set_value (const char *bucket, const char *key, const char *mkey,
- const char *mvalue);
-int meta_get_value (const char *bucket, const char *key, const char *mkey,
- char **mvalue);
-
-void *meta_query_new (const char *bucket, const char *key, const char *expr);
-int meta_query_next (void *qobj, char **bucket, char **key);
-void meta_query_stop (void *qobj);
-void meta_delete (const char *bucket, const char *key);
-size_t meta_get_size (const char *bucket, const char *key);
-void *meta_get_attrs (const char *bucket, const char *key);
-int meta_attr_next (void *aobj, const char **, const char **);
-void meta_attr_stop (void *aobj);
+extern void meta_init (void);
+extern void meta_fini (void);
+extern char *meta_did_put (const char *bucket, const char *key, const char *loc,
+ size_t size);
+extern void meta_got_copy (const char *bucket, const char *key, const char *loc);
+extern char *meta_has_copy (const char *bucket, const char *key, const char *loc);
+extern int meta_set_value (const char *bucket, const char *key, const char *mkey,
+ const char *mvalue);
+extern int meta_get_value (const char *bucket, const char *key, const char *mkey,
+ char **mvalue);
+extern void *meta_query_new (const char *bucket, const char *key,
+ const char *expr);
+extern int meta_query_next (void *qobj, char **bucket, char **key);
+extern void meta_query_stop (void *qobj);
+extern void meta_delete (const char *bucket, const char *key);
+extern size_t meta_get_size (const char *bucket, const char *key);
+extern void *meta_get_attrs (const char *bucket, const char *key);
+extern int meta_attr_next (void *aobj, const char **, const char **);
+extern void meta_attr_stop (void *aobj);
#ifdef __cplusplus
}
diff --git a/mpipe.h b/mpipe.h
index a36e439..82da75d 100644
--- a/mpipe.h
+++ b/mpipe.h
@@ -88,18 +88,18 @@ typedef struct {
} pipe_private;
-void pipe_init_shared (pipe_shared *ps,
- void *owner, unsigned short ncons);
-pipe_private *pipe_init_private (pipe_shared *ps);
-int pipe_cons_wait (pipe_private *pp);
-void pipe_cons_signal (pipe_private *pp, int error);
-void pipe_cons_siginit (pipe_shared *ps, int error);
-int pipe_prod_wait_init (pipe_shared *ps);
-void pipe_prod_siginit (pipe_shared *ps, int error);
-int pipe_cons_wait_init (pipe_shared *ps);
-void pipe_prod_signal (pipe_shared *ps,
- void *ptr, size_t total);
-void pipe_prod_finish (pipe_shared *ps);
-void pipe_reset (pipe_shared *ps, unsigned short ncons);
+extern void pipe_init_shared (pipe_shared *ps,
+ void *owner, unsigned short ncons);
+extern pipe_private *pipe_init_private (pipe_shared *ps);
+extern int pipe_cons_wait (pipe_private *pp);
+extern void pipe_cons_signal (pipe_private *pp, int error);
+extern void pipe_cons_siginit (pipe_shared *ps, int error);
+extern int pipe_prod_wait_init (pipe_shared *ps);
+extern void pipe_prod_siginit (pipe_shared *ps, int error);
+extern int pipe_cons_wait_init (pipe_shared *ps);
+extern void pipe_prod_signal (pipe_shared *ps,
+ void *ptr, size_t total);
+extern void pipe_prod_finish (pipe_shared *ps);
+extern void pipe_reset (pipe_shared *ps, unsigned short ncons);
#endif
diff --git a/query.h b/query.h
index 61dcd31..e9f83d1 100644
--- a/query.h
+++ b/query.h
@@ -77,11 +77,11 @@ typedef struct {
* user state and still relies quite a bit on internal globals. That might
* mean that we just have to put a lock around it instead.
*/
-int eval (const value_t *expr,
- const getter_t *oget, const getter_t *sget);
-void print_value (const value_t *);
+extern int eval (const value_t *expr,
+ const getter_t *oget, const getter_t *sget);
+extern void print_value (const value_t *);
-value_t *parse (const char *text);
+extern value_t *parse (const char *text);
#if defined __CPLUSPLUS__ || defined __cplusplus
}
diff --git a/replica.h b/replica.h
index a489f1d..971f060 100644
--- a/replica.h
+++ b/replica.h
@@ -18,13 +18,13 @@
#include "state_defs.h"
-void repl_init (void);
-void replicate (const char *url, size_t size,
- const char *policy, my_state *ms);
-void replicate_delete (const char *url, my_state *ms);
-void replicate_bcreate (const char *bucket, my_state *ms);
-int get_rep_count (void);
-
-char *follow_link (char *object, const char *key);
+extern void repl_init (void);
+extern void replicate (const char *url, size_t size,
+ const char *policy, my_state *ms);
+extern void replicate_delete (const char *url, my_state *ms);
+extern void replicate_bcreate (const char *bucket, my_state *ms);
+extern int get_rep_count (void);
+
+extern char *follow_link (char *object, const char *key);
#endif
diff --git a/setup.h b/setup.h
index bc6df77..fc4eb3f 100644
--- a/setup.h
+++ b/setup.h
@@ -37,26 +37,26 @@ typedef struct _provider {
char *token;
} provider_t;
-provider_t *g_master_prov;
-
-const char *parse_config (char *);
-provider_t *get_provider (const char *name);
-void update_provider (const char *provname,
- const char *username,
- const char *password);
-const char *get_provider_value (const provider_t *prov,
- const char *fname);
-
-const char *auto_config (void);
-int validate_provider (Hash_table *h);
-provider_t *find_provider (const char *name);
-int add_provider (Hash_table *h);
-provider_t *get_main_provider (void);
-void set_main_provider (provider_t *prov);
+extern provider_t *g_master_prov;
+
+extern const char *parse_config (char *);
+extern provider_t *get_provider (const char *name);
+extern void update_provider (const char *provname,
+ const char *username,
+ const char *password);
+extern const char *get_provider_value (const provider_t *prov,
+ const char *fname);
+
+extern const char *auto_config (void);
+extern int validate_provider (Hash_table *h);
+extern provider_t *find_provider (const char *name);
+extern int add_provider (Hash_table *h);
+extern provider_t *get_main_provider (void);
+extern void set_main_provider (provider_t *prov);
typedef int (*prov_iterator_fn) (provider_t *, void *);
-int prov_do_for_each (prov_iterator_fn fn, void *client_data);
-provider_t **hash_get_prov_list (size_t *n);
+extern int prov_do_for_each (prov_iterator_fn fn, void *client_data);
+extern provider_t **hash_get_prov_list (size_t *n);
struct kv_pair
{
diff --git a/template.h b/template.h
index 6603073..325c0c4 100644
--- a/template.h
+++ b/template.h
@@ -45,30 +45,30 @@ typedef struct {
#define TMPL_CTX_DONE ((tmpl_ctx_t *)(-1))
-tmpl_ctx_t *tmpl_get_ctx (const char *type);
-size_t tmpl_root_header (tmpl_ctx_t *ctx,
- const char *name, const char *version);
-size_t tmpl_root_entry (tmpl_ctx_t *ctx,
- const char *rel, const char *link);
-size_t tmpl_root_footer (tmpl_ctx_t *ctx);
-size_t tmpl_prov_header (tmpl_ctx_t *ctx);
+extern tmpl_ctx_t *tmpl_get_ctx (const char *type);
+extern size_t tmpl_root_header (tmpl_ctx_t *ctx,
+ const char *name, const char *version);
+extern size_t tmpl_root_entry (tmpl_ctx_t *ctx,
+ const char *rel, const char *link);
+extern size_t tmpl_root_footer (tmpl_ctx_t *ctx);
+extern size_t tmpl_prov_header (tmpl_ctx_t *ctx);
-int tmpl_prov_entry (char *buf, size_t buf_len,
- tmpl_ctx_t *ctx,
- const char *name, const char *type,
- const char *host, int port,
- const char *user, const char *pass);
+extern int tmpl_prov_entry (char *buf, size_t buf_len,
+ tmpl_ctx_t *ctx,
+ const char *name, const char *type,
+ const char *host, int port,
+ const char *user, const char *pass);
-size_t tmpl_prov_footer (tmpl_ctx_t *ctx);
-size_t tmpl_list_header (tmpl_ctx_t *ctx);
-size_t tmpl_list_entry (tmpl_ctx_t *ctx,
- const char *bucket, const char *key);
-size_t tmpl_list_footer (tmpl_ctx_t *ctx);
-size_t tmpl_obj_header (tmpl_ctx_t *ctx,
- const char *bucket, const char *key);
-size_t tmpl_obj_entry (tmpl_ctx_t *ctx, const char *bucket,
- const char *key, const char *attr);
-size_t tmpl_obj_footer (tmpl_ctx_t *ctx);
+extern size_t tmpl_prov_footer (tmpl_ctx_t *ctx);
+extern size_t tmpl_list_header (tmpl_ctx_t *ctx);
+extern size_t tmpl_list_entry (tmpl_ctx_t *ctx,
+ const char *bucket, const char *key);
+extern size_t tmpl_list_footer (tmpl_ctx_t *ctx);
+extern size_t tmpl_obj_header (tmpl_ctx_t *ctx,
+ const char *bucket, const char *key);
+extern size_t tmpl_obj_entry (tmpl_ctx_t *ctx, const char *bucket,
+ const char *key, const char *attr);
+extern size_t tmpl_obj_footer (tmpl_ctx_t *ctx);
#endif
12 years, 11 months
[iwhd] build: update gnulib submodule to latest
by Jim Meyering
commit 1fa22b30d136c7e741c0009cd79a430267c639f5
Author: Jim Meyering <meyering(a)redhat.com>
Date: Wed May 11 20:12:35 2011 +0200
build: update gnulib submodule to latest
gnulib | 2 +-
lib/.gitignore | 4 ++++
2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gnulib b/gnulib
index d801cb7..4104cd4 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit d801cb77b966678e21af7a106b15a3fe598d5ec4
+Subproject commit 4104cd4f7746f8ba7e75e3292c78c2c528b0c88a
diff --git a/lib/.gitignore b/lib/.gitignore
index 0f9a3ae..aef2b8b 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -46,11 +46,15 @@
/fcntl.in.h
/fd-hook.c
/fd-hook.h
+/fflush.c
/file-has-acl.c
/fpending.c
/fpending.h
+/fpurge.c
/freading.c
/freading.h
+/fseeko.c
+/ftello.c
/full-write.c
/full-write.h
/getopt.c
12 years, 11 months
[iwhd] tests: avoid subtle shell semantics bug
by Jim Meyering
commit 939b56912aaf1a7cd64bd7a4858c7292ba2dc2b4
Author: Jim Meyering <meyering(a)redhat.com>
Date: Mon May 9 21:55:53 2011 +0200
tests: avoid subtle shell semantics bug
This bash command will always exit successfully,
i.e., the "return 1" will never happen:
bash -c 'f(){ local f=$(false)||return 1; return 0; }; f'
That's because the assignment always succeeds, and that success
is what determines the return value, not the $(...) command.
This is very counter-intuitive, sigh.
The work-around is to separate the declaration and assignment, as in
local f; f=$(...) || ...
* t/replication: Do that.
t/replication | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/t/replication b/t/replication
index 30d761c..2a7a1ef 100644
--- a/t/replication
+++ b/t/replication
@@ -54,7 +54,7 @@ cleanup_() { kill -9 $mongo_pid; kill $iwhd_pid $iwhd_d_pid; }
api=http://localhost:$port
wait_for_repl() {
- local n_req=$(curl -d op=rep_status $api) || return 1
+ local n_req; n_req=$(curl -d op=rep_status $api) || return 1
case $n_req in
'0 requests') return 0 ;;
*) return 1 ;;
12 years, 11 months
[iwhd] Support registration in RHEV-M 2.2.
by Pete Zaitcev
commit ed461d0da64d3e3c82c9c9ca5c867a3ec3a991c4
Author: Pete Zaitcev <zaitcev(a)yahoo.com>
Date: Thu May 12 17:41:26 2011 -0600
Support registration in RHEV-M 2.2.
The support of RHEV-M was initially developed with RHEV 3 im mind.
However, RHEV 3 is not yet available, and the version in field is
RHEV 2.2. Fortunately, these almost perfectly compatible. Only the
following small adjustments were required:
- Cancel the workaround for bz#670397, because it used hardcoded
base API. The base differs in 2.2.
- Make sure that we transmit data over SSL (albeit in an insecure
way for now). The 2.2 only accepts SSL connections by default.
- Make some comparisons case-insensitive.
Also, we updated the documentation somewhat.
bootstrap.conf | 1 +
dc-rhev-image.c | 51 ++++++++++++++++++++++++++++++++++---------------
doc/registrations.md | 7 ++++++
3 files changed, 43 insertions(+), 16 deletions(-)
---
diff --git a/bootstrap.conf b/bootstrap.conf
index a903da1..ac139fc 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -26,6 +26,7 @@ gnulib_modules='
announce-gen
base64
c-ctype
+c-strcase
calloc-posix
close
closeout
diff --git a/dc-rhev-image.c b/dc-rhev-image.c
index b9c3479..1488468 100644
--- a/dc-rhev-image.c
+++ b/dc-rhev-image.c
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdbool.h>
#include <unistd.h>
#include <errno.h>
#include <time.h>
@@ -50,6 +51,7 @@
#include "progname.h"
#include "dirname.h"
#include "xalloc.h"
+#include "c-strcase.h"
/*
* Note that we almost never prefix with TAG due to compatibility with EC2.
@@ -452,7 +454,7 @@ static struct stor_dom *apistordom_1(struct config *cfg, xmlChar *uuidsd,
}
/*
- * XXX canonicalize host in case of e.g. raw IPv4/IPv6 address.
+ * FIXME canonicalize host in case of e.g. raw IPv4/IPv6 address.
*/
ettext = etaddr->children; /* mysterious indirection */
if (!ettext || ettext->type!=XML_TEXT_NODE || !ettext->content)
@@ -514,10 +516,8 @@ static struct stor_dom *apistordom(struct config *cfg,
CURLcode rcc;
int rc;
- // XXX GET /rhevm-api/storagedomains/ crashes server, see bz#670397
// So for now we ignore the pathsd and use a query instead.
- // rc = asprintf(&url, "%s%s", connection->base, pathsd);
- rc = asprintf(&url, "%s%s", connection->base, "/rhevm-api/storagedomains/?search=type%20%21%3D%20fcp");
+ rc = asprintf(&url, "%s%s", connection->base, pathsd);
if (rc < 0)
goto err_alloc;
@@ -566,7 +566,7 @@ static struct stor_dom *apistordom(struct config *cfg,
ettext = ettype->children; /* mysterious indirection */
if (!ettext || ettext->type!=XML_TEXT_NODE || !ettext->content)
continue;
- if (strcmp((char *)ettext->content, "EXPORT") != 0)
+ if (c_strcasecmp((char *)ettext->content, "EXPORT") != 0)
continue;
etstor = xmlGetChild(et, "storage");
@@ -579,7 +579,7 @@ static struct stor_dom *apistordom(struct config *cfg,
ettext = ettype->children; /* mysterious indirection */
if (!ettext || ettext->type!=XML_TEXT_NODE || !ettext->content)
continue;
- if (strcmp((char *)ettext->content, "NFS") != 0)
+ if (c_strcasecmp((char *)ettext->content, "NFS") != 0)
continue;
uuidsd = xmlGetProp(et, (xmlChar *)"id");
@@ -595,8 +595,9 @@ static struct stor_dom *apistordom(struct config *cfg,
}
if (!sd) {
- fprintf(stderr, "ERROR NFS storage domain for `%s' not found\n",
- url);
+ fprintf(stderr,
+ "ERROR NFS storage domain for `%s:%s' not found\n",
+ cfg->nfshost, cfg->nfspath);
exit(EXIT_FAILURE);
}
@@ -812,7 +813,8 @@ static struct stor_dom *apistart(struct config *cfg)
{
struct http_uri huri;
struct stor_dom *sd;
- char *host, *path, *base;
+ char *scheme, *host, *path, *base;
+ bool is_ssl;
char *pathsd, *pathdc;
char *authraw, *authhdr;
size_t authrlen, authhlen;
@@ -837,16 +839,35 @@ static struct stor_dom *apistart(struct config *cfg)
host = strndup(huri.hostname, huri.hostname_len);
if (!host)
goto err_alloc;
+ scheme = strndup(huri.scheme, huri.scheme_len);
+ if (!host)
+ goto err_alloc;
+
+ if (strcmp(scheme, "http") == 0) {
+ is_ssl = false;
+ } else if (strcmp(scheme, "https") == 0) {
+ is_ssl = true;
+ } else {
+ fprintf(stderr, "ERROR Invalid URL scheme `%s'\n", scheme);
+ exit(EXIT_FAILURE);
+ }
if (huri.port)
- rc = asprintf(&base, "http://%s:%u", host, huri.port);
+ rc = asprintf(&base, "%s://%s:%u", scheme, host, huri.port);
else
- rc = asprintf(&base, "http://%s", host);
+ rc = asprintf(&base, "%s://%s", scheme, host);
if (rc < 0)
goto err_alloc;
connection.base = base;
connection.curl = curl_easy_init();
+ if (is_ssl) {
+ /*
+ * FIXME We should check the certificates, not ignore the problem.
+ */
+ curl_easy_setopt(connection.curl, CURLOPT_SSL_VERIFYHOST, 0);
+ curl_easy_setopt(connection.curl, CURLOPT_SSL_VERIFYPEER, 0);
+ }
headers = NULL;
@@ -880,8 +901,6 @@ static struct stor_dom *apistart(struct config *cfg)
apipaths(&connection, headers, path, &pathsd, &pathdc);
/*
- * We should pull the API version and check that it's more than 2.3 XXX
- *
* Step 2, connect again, get domains
*/
sd = apistordom(cfg, &connection, headers, pathsd);
@@ -1430,7 +1449,7 @@ static void copyimage(struct config *cfg, struct stor_dom *sd, uuid_t tpl_uuid)
uuid_generate_random(vol_uuid);
uuid_generate_random(img_uuid);
- /* XXX Do something about garbage-collecting iwhd.* directories */
+ /* FIXME Do something about garbage-collecting iwhd.* directories */
uuid_unparse_lower(img_uuid, uuidbuf);
rc = asprintf(&tmpimgdir, "%s/iwhd.%s", domdir, uuidbuf);
@@ -1573,8 +1592,8 @@ int main(int argc, char **argv, char **envp)
cfg_veripick(&cfg.nfshost, cfgname, jcfg, "nfshost");
cfg_veripick(&cfg.nfspath, cfgname, jcfg, "nfspath");
/*
- * nfsdir: A directory where sysadmin or boot scripts or autofs mounted
- * the same area that RHEV-M considers an export domain (/mnt/vdsm/rhevm23).
+ * nfsdir: A directory where sysadmin, boot scripts or autofs mounted the
+ * same area that RHEV-M considers an export domain (/mnt/vdsm/rhevm23).
* N.B. If iwhd is running on the NFS server itself, nfsdir can be the
* exported directory itself (like /home/vdsm/rhevm23). We verify that
* the directory contains an expected structure, so attach it to RHEV-M
diff --git a/doc/registrations.md b/doc/registrations.md
index 6a12688..cfcf8bb 100644
--- a/doc/registrations.md
+++ b/doc/registrations.md
@@ -75,6 +75,13 @@ tricks with wrapping dc-rhev-image into a script that calls sudo.
Do not attempt it if you value your sanity.
The area S must be mounted at H (example below assumes /mnt/iwhd-fish).
+For the curl example below, mount like this:
+ mount -t nfs -o v3 fish.usersys.redhat.com:/home/vdsm/v1 /mnt/iwhd-fish
+
+In RHEL 6 and Fedora 14, NFS mounts default to v4, which causes some
+weird file ownership issues. Verify by checking what RHEV-M created
+on the next step. The /mnt/iwhd-fish should contain files owned by vdsm.
+Note that this has nothing to do with root_squash.
Finally, RHEV-M must be told to "import" and "attach" so-called
"export storage domain". At this time, RHEV-M server mounts the area S
12 years, 11 months
[iwhd] build: list flex as a build prerequisite
by Jim Meyering
commit 6ebedfecc51b20930b76e90dad0a3f7babfc811c
Author: Jim Meyering <meyering(a)redhat.com>
Date: Mon May 9 14:45:03 2011 +0200
build: list flex as a build prerequisite
* bootstrap.conf (buildreq): Add flex.
Reported by Francesco Vollero.
bootstrap.conf | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/bootstrap.conf b/bootstrap.conf
index 13f79a4..a903da1 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -103,6 +103,7 @@ gettext 0.17
git 1.4.4
gperf -
gzip -
+flex -
rsync -
tar -
"
12 years, 12 months
[iwhd] Created tag v0.94
by Jim Meyering
The signed tag 'v0.94' was created.
Tagger: Jim Meyering <meyering(a)redhat.com>
Date: Fri May 6 19:32:23 2011 +0200
iwhd 0.94
Changes since the last tag 'v0.93':
Jim Meyering (21):
post-release administrivia
maint: Cc aeolus-devel on the next release announcement
cfg.mk: indent (non-leading) consistently with TABs
tests: fail sooner (and with a good explanation) without mongod
tests: clarify diag: missing mongod program, not the mongod package
tests: redirect mongod --help's stdout to /dev/null
build: do not require autoconf-2.65 (2.62 should be enough)
upon successful bucket or object creation, issue HTTP code 201, not 200
maint: remove unnecessary #ifdef VERSION
maint: use less syntax in #if directives (e.g., remove parentheses)
maint: enable a syntax check, now that it passes
maint: add gperf to the list of build-from-clone-required tools
maint: remove now-unnecessary use of gnulib's strtol module
prepare to fix a GC/thread-related bug: no semantic change
iwhd: don't segfault during garbage collection
tests: give the memory subsystem a work-out, to exercise the GC
maint: make the release process more automated
maint: update gnulib to latest
maint: document the release process
avoid theoretical integer overflow and -Wsign-compare warning
version 0.94
Mark McLoughlin (1):
build: check for mongodb headers
Pete Zaitcev (2):
Add a memo about registrations.
emit valid JSON for the root
12 years, 12 months
[iwhd] post-release administrivia
by Jim Meyering
commit 39d6156dd059198e17ad27af1d6369371e5b48d8
Author: Jim Meyering <meyering(a)redhat.com>
Date: Fri May 6 19:34:23 2011 +0200
post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
.prev-version | 2 +-
NEWS | 3 +++
cfg.mk | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/.prev-version b/.prev-version
index 341ad3c..fc73074 100644
--- a/.prev-version
+++ b/.prev-version
@@ -1 +1 @@
-0.93
+0.94
diff --git a/NEWS b/NEWS
index b3d45ac..be71dba 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
iwhd NEWS -*- outline -*-
+* Noteworthy changes in release ?.? (????-??-??) [?]
+
+
* Noteworthy changes in release 0.94 (2011-05-06) [stable]
** Bug fixes
diff --git a/cfg.mk b/cfg.mk
index 3879588..a13d933 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -38,7 +38,7 @@ bootstrap-tools = autoconf,automake,gnulib
# Now that we have better tests, make this the default.
export VERBOSE = yes
-old_NEWS_hash = e9ec1d38f8c5686545a3e1ed3ce34add
+old_NEWS_hash = a22c412ec7d657ca160f5a5fde0cb15d
sc_prohibit_echo_minus_en:
@prohibit='\<echo -[en]' \
12 years, 12 months
[iwhd] version 0.94
by Jim Meyering
commit fa06242beccf3faf0d6d9945335b4e844a1f2a8b
Author: Jim Meyering <meyering(a)redhat.com>
Date: Fri May 6 19:32:23 2011 +0200
version 0.94
* NEWS: Record release date.
NEWS | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index a2e8e51..b3d45ac 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,6 @@
iwhd NEWS -*- outline -*-
-* Noteworthy changes in release ?.? (????-??-??) [?]
+* Noteworthy changes in release 0.94 (2011-05-06) [stable]
** Bug fixes
12 years, 12 months
[iwhd] avoid theoretical integer overflow and -Wsign-compare warning
by Jim Meyering
commit 8ace2b9ed42d91ce96f358103cf1b3d94f613fd9
Author: Jim Meyering <meyering(a)redhat.com>
Date: Fri May 6 14:47:35 2011 +0200
avoid theoretical integer overflow and -Wsign-compare warning
* meta.cpp (class AttrList) [idx]: Change type: s/int/size_t/,
This variable is only ever incremented and used as a vector index.
meta.cpp | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/meta.cpp b/meta.cpp
index 3cf6f57..b88b8c3 100644
--- a/meta.cpp
+++ b/meta.cpp
@@ -611,7 +611,7 @@ public:
int Next (const char **, const char **);
BSONObj obj;
vector<BSONElement> vec;
- int idx;
+ size_t idx;
};
AttrList::AttrList (BSONObj &bo)
@@ -627,7 +627,12 @@ AttrList::Next (const char **name, const char **value)
BSONElement elem;
while (idx < vec.size()) {
- elem = vec[idx++];
+ elem = vec[idx];
+
+ // Do not wrap back to 0 when vec.size is SIZE_MAX.
+ if (idx != vec.size())
+ idx++;
+
if (elem.type() == String) {
*name = elem.fieldName();
*value = elem.String().c_str();
12 years, 12 months