The branch, master has been updated via fa20a56 tests: getaddrinfo() should use 0 as ai_flags. via 3787de0 cmake: Fix a typo in nss_wrapper-config.cmake.in. via e46f386 Add README.install - instructions for building and installing. from a5b392d cmake: Fix policy check.
http://gitweb.samba.org/?p=nss_wrapper.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit fa20a56d4126dd5b111d06f84442dc972f024313 Author: Andreas Schneider <a...@samba.org> Date: Thu May 22 15:10:46 2014 +0200 tests: getaddrinfo() should use 0 as ai_flags. This fixes an issue for the test platform configuration with IPv4 only addresses. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10597 Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 3787de075b856151ea49e1b07260b33e8b1b6d92 Author: Andreas Schneider <a...@samba.org> Date: Thu May 22 15:11:10 2014 +0200 cmake: Fix a typo in nss_wrapper-config.cmake.in. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit e46f386ee6e827b0bd080d44698f66720c07349c Author: Michael Adam <ob...@samba.org> Date: Tue May 27 14:07:17 2014 +0200 Add README.install - instructions for building and installing. Signed-off-by: Michael Adam <ob...@samba.org> Reviewed-by: Andreas Schneider <a...@samba.org> ----------------------------------------------------------------------- Summary of changes: README.install | 78 +++++++++++++++++++++++++++++++++++++++++++ nss_wrapper-config.cmake.in | 2 +- tests/test_getaddrinfo.c | 10 +++--- 3 files changed, 84 insertions(+), 6 deletions(-) create mode 100644 README.install Changeset truncated at 500 lines: diff --git a/README.install b/README.install new file mode 100644 index 0000000..7ee4e71 --- /dev/null +++ b/README.install @@ -0,0 +1,78 @@ +Obtaining the sources +===================== + +Source tarballs for nss_wrapper can be downloaded from + + https://ftp.samba.org/pub/cwrap/ + +The source code repository for socket wrapper is located under + + git://git.samba.org/nss_wrapper.git + +To create a local copy, run + + $ git clone git://git.samba.org/nss_wrapper.git + $ cd nss_wrapper + +Building from sources +===================== + +nss_wrapper uses cmake (www.cmake.org) as its build system. + +In an unpacked sources base directory, create a directory to +contain the build results, e.g. + + $ mkdir obj + $ cd obj + +Note that "obj" is just an example. The directory can +be named arbitrarily. + +Next, run cmake to configure the build, e.g. + + $ cmake -DCMAKE_INSTALL_PREFIX=<prefix> .. + +or on a 64 bit red hat system: + + $ cmake -DCMAKE_INSTALL_PREFIX=<prefix> -DLIB_SUFFIX=64 .. + +The "<prefix>" should be replaced by the intended installation +target prefix directory, typically /usr or /usr/local. + +Note that the target directory does not have to be a direct +or indirect subdirectory of the source base directory: It can +be an arbitrary directory in the system. In the general case, +".." has to be replaced by a relative or absolute path of the +source base directory in the "cmake" command line. + +One can control the build type with "-DCMAKE_BUILD_TYPE=<mode>" +where <mode> can be one of Debug, Release, RelWithDebInfo, and +some more (see cmake.org). The default is "RelWithDebInfo". + +After configuring with cmake, run the build with + + $ make + +Unit testing +============ + +In order to support running the test suite after building, +the cmocka unit test framework needs to be installed (cmocka.org), +and you need to specify + + -DUNIT_TESTING=ON + +in the cmake run. After running "make", + + $ make test + +runs the test suite. + +Installing +========== + +nss_wrapper is installed into the prefix directory +after running "cmake" and "make" with + + $ make install + diff --git a/nss_wrapper-config.cmake.in b/nss_wrapper-config.cmake.in index ccf7113..3932a87 100644 --- a/nss_wrapper-config.cmake.in +++ b/nss_wrapper-config.cmake.in @@ -1 +1 @@ -set(NSS_WRAPPER_LIRBARY @LIB_INSTALL_DIR@/@NSS_WRAPPER_LIB@) +set(NSS_WRAPPER_LIBRARY @LIB_INSTALL_DIR@/@NSS_WRAPPER_LIB@) diff --git a/tests/test_getaddrinfo.c b/tests/test_getaddrinfo.c index ce06fd9..a7714b1 100644 --- a/tests/test_getaddrinfo.c +++ b/tests/test_getaddrinfo.c @@ -155,7 +155,7 @@ static void test_nwrap_getaddrinfo_local(void **state) memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_ADDRCONFIG; + hints.ai_flags = 0; rc = getaddrinfo("127.0.0.1", NULL, &hints, &res); assert_int_equal(rc, 0); @@ -187,7 +187,7 @@ static void test_nwrap_getaddrinfo_name(void **state) memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_ADDRCONFIG; + hints.ai_flags = 0; rc = getaddrinfo("maximegalon.galaxy.site", NULL, &hints, &res); assert_int_equal(rc, 0); @@ -209,7 +209,7 @@ static void test_nwrap_getaddrinfo_name(void **state) memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_ADDRCONFIG; + hints.ai_flags = 0; rc = getaddrinfo("MAGRATHEA", NULL, &hints, &res); assert_int_equal(rc, 0); @@ -242,7 +242,7 @@ static void test_nwrap_getaddrinfo_service(void **state) memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; - hints.ai_flags = AI_ADDRCONFIG; + hints.ai_flags = 0; rc = getaddrinfo("magrathea", "wurst", &hints, &res); assert_int_equal(rc, EAI_SERVICE); @@ -281,7 +281,7 @@ static void test_nwrap_getaddrinfo_null(void **state) hints.ai_family = AF_INET6; hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = 17; - hints.ai_flags = AI_ADDRCONFIG; + hints.ai_flags = 0; rc = getaddrinfo(NULL, NULL, &hints, &res); assert_int_equal(rc, EAI_NONAME); -- NSS Wrapper Repository