Here is small patch to enable link against higher-version db for nfs4d and tabled. :-)

2010-04-14 Thread Samba - BoYang
Please review them, thanks!

Bo Yang

-- 
Samba Team  boy...@samba.orghttp://www.samba.org
>From ac6d3f7cb7caa3dca498096bd0c07e6b02601239 Mon Sep 17 00:00:00 2001
From: Bo Yang 
Date: Fri, 2 Apr 2010 18:35:12 +0800
Subject: [PATCH] Enable build on db-4.9+.

Signed-off-by: Bo Yang 
---
 configure.ac |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7e8cbc7..3b63cf1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,12 +43,15 @@ dnl -
 dnl Checks for required libraries
 dnl -
 dnl AC_CHECK_LIB(gssrpc, gssrpc_svc_register, GSSRPC_LIBS=-lgssrpc, exit 1)
-AC_CHECK_LIB(db-4.7, db_create, DB4_LIBS=-ldb-4.7,
+AC_CHECK_LIB(db-5.0, db_create, DB4_LIBS=-ldb-5.0,
+	AC_CHECK_LIB(db-4.9, db_create, DB4_LIBS=-ldb-4.9,
+	AC_CHECK_LIB(db-4.8, db_create, DB4_LIBS=-ldb-4.8,
+	AC_CHECK_LIB(db-4.7, db_create, DB4_LIBS=-ldb-4.7,
 	AC_CHECK_LIB(db-4.6, db_create, DB4_LIBS=-ldb-4.6,
 	AC_CHECK_LIB(db-4.5, db_create, DB4_LIBS=-ldb-4.5,
 	AC_CHECK_LIB(db-4.4, db_create, DB4_LIBS=-ldb-4.4,
 	AC_CHECK_LIB(db-4.3, db_create, DB4_LIBS=-ldb-4.3,
-	[AC_MSG_ERROR([Missing required libdb 4.x])])
+	[AC_MSG_ERROR([Missing required libdb 4.x])]
 AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent,
   [AC_MSG_ERROR([Missing required libevent])])
 AC_CHECK_LIB(argp, argp_parse, ARGP_LIBS=-largp)
-- 
1.6.0.2

>From f690daf3648f47a8a7ac317613fff81e24ce6bca Mon Sep 17 00:00:00 2001
From: Bo Yang 
Date: Fri, 2 Apr 2010 18:38:08 +0800
Subject: [PATCH] Enable build on 4.8+.

Signed-off-by: Bo Yang 
---
 configure.ac |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index c6baa15..9095c67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,13 +76,15 @@ dnl -
 AC_CHECK_LIB(pcre, pcre_compile, PCRE_LIBS=-lpcre)
 AC_CHECK_LIB(crypto, MD5_Init, CRYPTO_LIBS=-lcrypto)
 AC_CHECK_LIB(ssl, SSL_new, SSL_LIBS=-lssl)
-AC_CHECK_LIB(db-4.8, db_create, DB4_LIBS=-ldb-4.8,
+AC_CHECK_LIB(db-5.0, db_create, DB4_LIBS=-ldb-5.0,
+	AC_CHECK_LIB(db-4.9, db_create, DB4_LIBS=-ldb-4.9,
+	AC_CHECK_LIB(db-4.8, db_create, DB4_LIBS=-ldb-4.8,
 	AC_CHECK_LIB(db-4.7, db_create, DB4_LIBS=-ldb-4.7,
 	AC_CHECK_LIB(db-4.6, db_create, DB4_LIBS=-ldb-4.6,
 	AC_CHECK_LIB(db-4.5, db_create, DB4_LIBS=-ldb-4.5,
 	AC_CHECK_LIB(db-4.4, db_create, DB4_LIBS=-ldb-4.4,
 	AC_CHECK_LIB(db-4.3, db_create, DB4_LIBS=-ldb-4.3,
-  [AC_MSG_ERROR([Missing required libdb 4.x])]))
+  [AC_MSG_ERROR([Missing required libdb 4.x])]
 AC_CHECK_LIB(event, event_base_new, EVENT_LIBS=-levent,
   [AC_MSG_ERROR([Missing required libevent])])
 AC_SEARCH_LIBS(argp_parse, argp)
-- 
1.6.0.2



Re: Here is small patch to enable link against higher-version db for nfs4d and tabled. :-)

2010-04-14 Thread Jeff Garzik

On 04/14/2010 06:44 AM, Samba - BoYang wrote:

Please review them, thanks!


Applied to nfs4d and tabled, thanks!

In the future, it would be appreciated to see separate emails, one email 
per patch.


Best regards,

Jeff




--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Here is small patch to enable link against higher-version db for nfs4d and tabled. :-)

2010-04-14 Thread Samba - BoYang
On 04/14/2010 09:40 PM, Jeff Garzik wrote:
> would be appreciated to see separate emails, o

Yah, I see. :-)


-- 
Samba Team  boy...@samba.orghttp://www.samba.org
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Patch 1/3] CLD: End-to-end verbosity v3

2010-04-14 Thread Pete Zaitcev
On Wed, 14 Apr 2010 00:01:23 -0400
Jeff Garzik  wrote:

> Long term, I think the per-packet session logging macro should be made 
> more clear, perhaps calling it HAIL_SESS or even HAIL_PKT

I saved this. Then, when you have a better idea already... SUDDENLY,
A PATCH! :-)

-- Pete
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 0/8] Cleanups

2010-04-14 Thread Pete Zaitcev
Just a bunch of mostly useless stuff. Feel free to reject, but
let me know so I can kill them out of my trees too.
-- Pete
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 1/8] CLD: cleanup: add cld_msg_rpc.x

2010-04-14 Thread Pete Zaitcev
You know what's weird... Without this, I cannot build an RPM at all,
the rpmbuild complains about unpackaged files and aborts. But
everyone else seems to have no problem? Strange. BTW, I am on
Fedora 14.

Signed-off-by: Pete Zaitcev 

---
 lib/Makefile.am |1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index ea72426..012d558 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -27,6 +27,7 @@ libcldc_la_SOURCES=   \
common.c\
libtimer.c  \
pkt.c   \
+   cld_msg_rpc.x   \
cld_msg_rpc_xdr.c
 
 libcldc_la_LDFLAGS = \
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 2/8] CLD: cleanup: add a log entry about sent packet

2010-04-14 Thread Pete Zaitcev
Currently, there's nothing in the verbose output about sent packets
at all. No, really! This is very confusing, even if I run tcpdump
in the same time. I think we should add this.

Signed-off-by: Pete Zaitcev 

---
 lib/cldc.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/cldc.c b/lib/cldc.c
index be8598f..305e05d 100644
--- a/lib/cldc.c
+++ b/lib/cldc.c
@@ -677,6 +677,8 @@ static void sess_expire(struct cldc_session *sess)
 static int sess_send_pkt(struct cldc_session *sess,
 const void *pkt, size_t pkt_len)
 {
+   HAIL_VERBOSE(&sess->log, "%s: sending %ld bytes",
+__func__, (long)pkt_len);
return sess->ops->pkt_send(sess->private,
   sess->addr, sess->addr_len,
   pkt, pkt_len);
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 3/8] CLD: cleanup: if() to switch()

2010-04-14 Thread Pete Zaitcev
I distinctly remember how my precious ifs were mercilessly replaced
elsewhere, but apparently this piece escaped notice thus far.
Now, make it more style-uniform with the rest.

Signed-off-by: Pete Zaitcev 

---
 lib/cldc.c |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/cldc.c b/lib/cldc.c
index be8598f..305e05d 100644
--- a/lib/cldc.c
+++ b/lib/cldc.c
@@ -1386,10 +1388,12 @@ static void ncld_thread_command(struct ncld_sess *nsess)
abort();
}
 
-   if (cmd == NCLD_CMD_END) {
+   switch (cmd) {
+   case NCLD_CMD_END:
/* No answer to requestor. Wait with g_thread_join. */
g_thread_exit(NULL);
-   } else if (cmd == NCLD_CMD_SESEV) {
+   break;
+   case NCLD_CMD_SESEV:
rrc = read(nsess->to_thread[0], &what, sizeof(uint32_t));
if (rrc < sizeof(uint32_t)) {
fprintf(stderr, "bad read param\n");
@@ -1397,7 +1401,8 @@ static void ncld_thread_command(struct ncld_sess *nsess)
}
if (nsess->event)
nsess->event(nsess->event_arg, what);
-   } else {
+   break;
+   default:
fprintf(stderr, "bad command 0x%x\n", cmd);
abort();
}
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 4/8] CLD: cleanup: add #include

2010-04-14 Thread Pete Zaitcev
A prototype is not included again.

Signed-off-by: Pete Zaitcev 

---
 lib/common.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/common.c b/lib/common.c
index fb0aae6..e399ec9 100644
--- a/lib/common.c
+++ b/lib/common.c
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "cld_msg_rpc.h"
 
 /* duplicated from tools/cldcli.c; put in common header somewhere? */
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 6/8] CLD: cleanup: add a event stub just to test

2010-04-14 Thread Pete Zaitcev
Tests do not really need this kind of thing, in fact if everything
goes well, we should NOT receive any events while test is running.
Still, I am curious about being sure that we do not. This will also
pop if we change something in the library implementation and start
leaking some events.

Signed-off-by: Pete Zaitcev 

---
 test/lock-file.c |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/test/lock-file.c b/test/lock-file.c
index 36cc62c..3bbe49b 100644
--- a/test/lock-file.c
+++ b/test/lock-file.c
@@ -31,6 +31,15 @@
 #include 
 #include "test.h"
 
+static void sess_event(void *priv, unsigned int what)
+{
+   if (what == CE_SESS_FAILED) {
+   fprintf(stderr, "Session failed\n");
+   exit(1);
+   }
+   fprintf(stderr, "Unknown event %d\n", what);
+}
+
 int main (int argc, char *argv[])
 {
struct ncld_sess *nsess;
@@ -49,7 +58,7 @@ int main (int argc, char *argv[])
if (port == 0)
return -1;
 
-   nsess = ncld_sess_open(TEST_HOST, port, &error, NULL, NULL,
+   nsess = ncld_sess_open(TEST_HOST, port, &error, sess_event, NULL,
 TEST_USER, TEST_USER_KEY, NULL);
if (!nsess) {
fprintf(stderr, "ncld_sess_open(host %s port %u) failed: %d\n",
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 7/8] tabled: cleanup: add #include

2010-04-14 Thread Pete Zaitcev
Same as everywhere else: missing prototypes, so implementations are
not actually matched by the compiler.

Signed-off-by: Pete Zaitcev 

---
 lib/readport.c |1 +
 test/libtest.c |1 +
 2 files changed, 2 insertions(+)

diff --git a/lib/readport.c b/lib/readport.c
index afd1c91..8589ec6 100644
--- a/lib/readport.c
+++ b/lib/readport.c
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /*
  * Read a port number from a port file, fill buffer.
diff --git a/test/libtest.c b/test/libtest.c
index ef07778..bdfe912 100644
--- a/test/libtest.c
+++ b/test/libtest.c
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include "test.h"
 
 bool find_our_hdr(const char *hdr, const void *data, size_t data_len)
 {
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 8/8] tabled: cleanup: add protype for main()

2010-04-14 Thread Pete Zaitcev
Completely useless warning: main is main, right? Is it even checked?
But oh well, stub it with unused arguments and hope other gcc version
does not complain about _that_.

Signed-off-by: Pete Zaitcev 

---
 test/wait-for-listen.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/wait-for-listen.c b/test/wait-for-listen.c
index 8cfdc56..300ff97 100644
--- a/test/wait-for-listen.c
+++ b/test/wait-for-listen.c
@@ -83,7 +83,7 @@ static int node_resolve(struct server_node *sn,
return -1;
 }
 
-int main()
+int main(int argc, char **argv)
 {
struct server_node snode, *sn = &snode;
time_t start_time;
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Patch 5/8] CLD: cleanup: wrap a line

2010-04-14 Thread Pete Zaitcev
Signed-off-by: Pete Zaitcev 

---
 lib/cldc.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Looks like I confused myself with patch numbering. This one is
out of order, or maybe a duplicate? Sending on the premise that
it's easier to drop.

diff --git b/lib/cldc.c a/lib/cldc.c
index 0eb7ad8..305e05d 100644
--- b/lib/cldc.c
+++ a/lib/cldc.c
@@ -1595,8 +1595,8 @@ struct ncld_sess *ncld_sess_open(const char *host, int 
port, int *error,
if (!nsess)
goto out_sesalloc;
memset(nsess, 0, sizeof(struct ncld_sess));
-   cld_timer_init(&nsess->udp_timer, "nsess-udp-timer", 
ncld_udp_timer_event,
-  nsess);
+   cld_timer_init(&nsess->udp_timer, "nsess-udp-timer",
+  ncld_udp_timer_event, nsess);
nsess->mutex = g_mutex_new();
if (!nsess->mutex)
goto out_mutex;
--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Patch 2/8] CLD: cleanup: add a log entry about sent packet

2010-04-14 Thread Jeff Garzik

On 04/14/2010 02:34 PM, Pete Zaitcev wrote:

Currently, there's nothing in the verbose output about sent packets
at all. No, really! This is very confusing, even if I run tcpdump
in the same time. I think we should add this.

Signed-off-by: Pete Zaitcev

---
  lib/cldc.c |2 ++
  1 file changed, 2 insertions(+)


applied 2-6


--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Patch 5/8] CLD: cleanup: wrap a line

2010-04-14 Thread Jeff Garzik

On 04/14/2010 02:46 PM, Pete Zaitcev wrote:

Signed-off-by: Pete Zaitcev

---
  lib/cldc.c |4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Looks like I confused myself with patch numbering. This one is
out of order, or maybe a duplicate? Sending on the premise that
it's easier to drop.


applied


--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Patch 7/8] tabled: cleanup: add #include

2010-04-14 Thread Jeff Garzik

On 04/14/2010 02:35 PM, Pete Zaitcev wrote:

Same as everywhere else: missing prototypes, so implementations are
not actually matched by the compiler.

Signed-off-by: Pete Zaitcev

---
  lib/readport.c |1 +
  test/libtest.c |1 +
  2 files changed, 2 insertions(+)


applied 7-8


--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Patch 1/8] CLD: cleanup: add cld_msg_rpc.x

2010-04-14 Thread Jeff Garzik

On 04/14/2010 02:33 PM, Pete Zaitcev wrote:

You know what's weird... Without this, I cannot build an RPM at all,
the rpmbuild complains about unpackaged files and aborts. But
everyone else seems to have no problem? Strange. BTW, I am on
Fedora 14.

Signed-off-by: Pete Zaitcev

---
  lib/Makefile.am |1 +
  1 file changed, 1 insertion(+)

diff --git a/lib/Makefile.am b/lib/Makefile.am
index ea72426..012d558 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -27,6 +27,7 @@ libcldc_la_SOURCES=   \
common.c\
libtimer.c  \
pkt.c   \
+   cld_msg_rpc.x   \
cld_msg_rpc_xdr.c


that's quite strange, because I built an official rawhide copy just fine 
without this...


Maybe you can try the SRPM from the koji build?

http://koji.fedoraproject.org/koji/taskinfo?taskID=2114193

May I presume you are using "make distcheck" to generate the tarball for 
your custom RPMs?


Jeff



--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html