BIND 10 trac1292_2, updated. 4ca30d27a1149bf5c445f382c4767b5c4e168d95 [1292_2] addressed rest of comments

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Nov 24 17:13:23 UTC 2011


The branch, trac1292_2 has been updated
       via  4ca30d27a1149bf5c445f382c4767b5c4e168d95 (commit)
       via  f6def2435fe72e00a782244461e8a186a4a23e63 (commit)
      from  75fc5817606b892c8eeb4964dc2f3d2f044f5491 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4ca30d27a1149bf5c445f382c4767b5c4e168d95
Author: Jelte Jansen <jelte at isc.org>
Date:   Thu Nov 24 18:13:04 2011 +0100

    [1292_2] addressed rest of comments

commit f6def2435fe72e00a782244461e8a186a4a23e63
Author: Jelte Jansen <jelte at isc.org>
Date:   Thu Nov 24 17:50:27 2011 +0100

    [1292_2] fix _config header and module install directory

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                                       |    2 +-
 src/bin/bind10/bind10_src.py.in                    |   12 --------
 src/lib/datasrc/Makefile.am                        |   11 ++++++-
 src/lib/datasrc/datasrc_config.h.in                |   15 ----------
 .../datasrc_config.h.pre.in}                       |   28 ++++++++-----------
 src/lib/datasrc/factory.cc                         |    6 ++--
 src/lib/datasrc/tests/Makefile.am                  |    9 +-----
 tests/lettuce/features/terrain/bind10_control.py   |    2 +-
 8 files changed, 28 insertions(+), 57 deletions(-)
 delete mode 100644 src/lib/datasrc/datasrc_config.h.in
 copy src/lib/{python/isc/datasrc/client_python.h => datasrc/datasrc_config.h.pre.in} (62%)

-----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 2888ace..bdfaa47 100644
--- a/configure.ac
+++ b/configure.ac
@@ -988,7 +988,7 @@ AC_OUTPUT([doc/version.ent
            src/lib/python/bind10_config.py
            src/lib/cc/session_config.h.pre
            src/lib/cc/tests/session_unittests_config.h
-           src/lib/datasrc/datasrc_config.h
+           src/lib/datasrc/datasrc_config.h.pre
            src/lib/log/tests/console_test.sh
            src/lib/log/tests/destination_test.sh
            src/lib/log/tests/init_logger_test.sh
diff --git a/src/bin/bind10/bind10_src.py.in b/src/bin/bind10/bind10_src.py.in
index 701f900..ce862c8 100755
--- a/src/bin/bind10/bind10_src.py.in
+++ b/src/bin/bind10/bind10_src.py.in
@@ -628,18 +628,6 @@ class BoB:
         # ... and start
         return self.start_process("b10-resolver", resargs, self.c_channel_env)
 
-    def start_xfrout(self, c_channel_env):
-        self.start_simple("b10-xfrout", c_channel_env)
-
-    def start_xfrin(self, c_channel_env):
-        self.start_simple("b10-xfrin", c_channel_env)
-
-    def start_zonemgr(self, c_channel_env):
-        self.start_simple("b10-zonemgr", c_channel_env)
-
-    def start_stats(self, c_channel_env):
-        self.start_simple("b10-stats", c_channel_env)
-
     def start_cmdctl(self):
         """
             Starts the command control process
diff --git a/src/lib/datasrc/Makefile.am b/src/lib/datasrc/Makefile.am
index bf1171e..0869d7a 100644
--- a/src/lib/datasrc/Makefile.am
+++ b/src/lib/datasrc/Makefile.am
@@ -7,9 +7,14 @@ AM_CPPFLAGS += $(SQLITE_CFLAGS)
 
 AM_CXXFLAGS = $(B10_CXXFLAGS)
 
+pkglibexecdir = $(libexecdir)/@PACKAGE@/modules
+
+datasrc_config.h: datasrc_config.h.pre
+	$(SED) -e "s|@@PKGLIBEXECDIR@@|$(pkglibexecdir)|" datasrc_config.h.pre >$@
+
 CLEANFILES = *.gcno *.gcda datasrc_messages.h datasrc_messages.cc
 
-lib_LTLIBRARIES = libdatasrc.la sqlite3_ds.la memory_ds.la
+lib_LTLIBRARIES = libdatasrc.la
 libdatasrc_la_SOURCES = data_source.h data_source.cc
 libdatasrc_la_SOURCES += static_datasrc.h static_datasrc.cc
 libdatasrc_la_SOURCES += sqlite3_datasrc.h sqlite3_datasrc.cc
@@ -25,6 +30,8 @@ libdatasrc_la_SOURCES += database.h database.cc
 libdatasrc_la_SOURCES += factory.h factory.cc
 nodist_libdatasrc_la_SOURCES = datasrc_messages.h datasrc_messages.cc
 
+pkglibexec_LTLIBRARIES =  sqlite3_ds.la memory_ds.la
+
 sqlite3_ds_la_SOURCES = sqlite3_accessor.h sqlite3_accessor.cc
 sqlite3_ds_la_LDFLAGS = -module
 sqlite3_ds_la_LIBADD = $(top_builddir)/src/lib/exceptions/libexceptions.la
@@ -42,7 +49,7 @@ libdatasrc_la_LIBADD += $(top_builddir)/src/lib/log/liblog.la
 libdatasrc_la_LIBADD += $(top_builddir)/src/lib/cc/libcc.la
 libdatasrc_la_LIBADD += $(SQLITE_LIBS)
 
-BUILT_SOURCES = datasrc_messages.h datasrc_messages.cc
+BUILT_SOURCES = datasrc_config.h datasrc_messages.h datasrc_messages.cc
 datasrc_messages.h datasrc_messages.cc: Makefile datasrc_messages.mes
 	$(top_builddir)/src/lib/log/compiler/message $(top_srcdir)/src/lib/datasrc/datasrc_messages.mes
 
diff --git a/src/lib/datasrc/datasrc_config.h.in b/src/lib/datasrc/datasrc_config.h.in
deleted file mode 100644
index c1bc0f4..0000000
--- a/src/lib/datasrc/datasrc_config.h.in
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
-//
-// Permission to use, copy, modify, and/or distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-// PERFORMANCE OF THIS SOFTWARE.
-
-#define MODULE_PATH "@prefix@/lib/"
diff --git a/src/lib/datasrc/datasrc_config.h.pre.in b/src/lib/datasrc/datasrc_config.h.pre.in
new file mode 100644
index 0000000..a11218c
--- /dev/null
+++ b/src/lib/datasrc/datasrc_config.h.pre.in
@@ -0,0 +1,31 @@
+// Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+#ifndef __DATASRC_CONFIG_H
+#define __DATASRC_CONFIG_H 1
+
+namespace isc {
+namespace datasrc {
+
+/// \brief Default directory to find the loadable data source modules
+///
+/// This is the directory where, once installed, modules such as
+/// memory_ds.so and sqlite3_ds.so are found. It is used by the
+/// DataSourceClient loader if no absolute path is used and
+/// B10_FROM_BUILD is not set in the environment.
+const char* const MODULE_PATH = "@@PKGLIBEXECDIR@@/";
+
+} // end namespace datasrc
+} // end namespace isc
+
+#endif // __DATASRC_CONFIG_H
diff --git a/src/lib/datasrc/factory.cc b/src/lib/datasrc/factory.cc
index a55fd15..64dd221 100644
--- a/src/lib/datasrc/factory.cc
+++ b/src/lib/datasrc/factory.cc
@@ -38,14 +38,14 @@ namespace {
 // Returns the resulting string to use with LibraryContainer.
 const std::string
 getDataSourceLibFile(const std::string& type) {
-    std::string lib_file = type;
-    if (type.length() == 0) {
+    if (type.empty()) {
         isc_throw(DataSourceError,
                   "DataSourceClient container called with empty type value");
     }
 
     // Type can be either a short name, in which case we need to
     // append "_ds.so", or it can be a direct .so module.
+    std::string lib_file = type;
     const int ext_pos = lib_file.rfind(".so");
     if (ext_pos == std::string::npos || ext_pos + 3 != lib_file.length()) {
         lib_file.append("_ds.so");
@@ -59,7 +59,7 @@ getDataSourceLibFile(const std::string& type) {
             lib_file = std::string(getenv("B10_FROM_BUILD")) +
                        "/src/lib/datasrc/.libs/" + lib_file;
         } else {
-            lib_file = MODULE_PATH + lib_file;
+            lib_file = isc::datasrc::MODULE_PATH + lib_file;
         }
     }
     return (lib_file);
diff --git a/src/lib/datasrc/tests/Makefile.am b/src/lib/datasrc/tests/Makefile.am
index f388845..ac0d098 100644
--- a/src/lib/datasrc/tests/Makefile.am
+++ b/src/lib/datasrc/tests/Makefile.am
@@ -55,13 +55,6 @@ run_unittests_SOURCES += test_datasrc.h test_datasrc.cc
 run_unittests_SOURCES += rbtree_unittest.cc
 run_unittests_SOURCES += logger_unittest.cc
 run_unittests_SOURCES += client_unittest.cc
-if !USE_STATIC_LINK
-# This test uses dynamically loadable module.  It will cause various
-# troubles with static link such as "missing" symbols in the static object
-# for the module.  As a workaround we disable this particualr test
-# in this case.
-#run_unittests_SOURCES += factory_unittest.cc
-endif
 
 run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
 run_unittests_LDFLAGS  = $(AM_LDFLAGS)  $(GTEST_LDFLAGS)
@@ -116,6 +109,7 @@ EXTRA_DIST += testdata/diffs.sqlite3
 # directory. Therefore we build it into a separate binary,
 # and call that from check-local with B10_FROM_BUILD set.
 # Also, we only want to do this when static building is not used.
+if !USE_STATIC_LINK
 noinst_PROGRAMS+=run_unittests_factory
 run_unittests_factory_SOURCES = $(common_sources)
 run_unittests_factory_SOURCES += factory_unittest.cc
@@ -124,3 +118,4 @@ run_unittests_factory_LDFLAGS  = $(AM_LDFLAGS)  $(GTEST_LDFLAGS)
 run_unittests_factory_LDADD = $(common_ldadd)
 check-local:
 	B10_FROM_BUILD=${abs_top_builddir} ./run_unittests_factory
+endif
diff --git a/tests/lettuce/features/terrain/bind10_control.py b/tests/lettuce/features/terrain/bind10_control.py
index ec93ce7..5248316 100644
--- a/tests/lettuce/features/terrain/bind10_control.py
+++ b/tests/lettuce/features/terrain/bind10_control.py
@@ -137,8 +137,8 @@ def send_command(step, command, cmdctl_port):
                                subprocess.PIPE, None)
     bindctl.stdin.write(command + "\n")
     bindctl.stdin.write("quit\n")
-    result = bindctl.wait()
     (stdout, stderr) = bindctl.communicate()
+    result = bindctl.returncode
     assert result == 0, "bindctl exit code: " + str(result) +\
                         "\nstdout:\n" + str(stdout) +\
                         "stderr:\n" + str(stderr)




More information about the bind10-changes mailing list