kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdcry...@apache.org
Subject [2/2] kudu git commit: cmake: search for all required Kerberos binaries
Date Fri, 04 Nov 2016 22:33:54 GMT
cmake: search for all required Kerberos binaries

If one or more binaries are not found, CMake will issue a warning like:

    -- Kerberos binary not found: security tests will fail (missing:  kdb5_util krb5kdc)

Change-Id: Ic680409088f487ee9fa28cbd7e8f2a95a034b4b2
Reviewed-on: http://gerrit.cloudera.org:8080/4954
Reviewed-by: Adar Dembo <adar@cloudera.com>
Tested-by: Kudu Jenkins


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/c53d9694
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/c53d9694
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/c53d9694

Branch: refs/heads/master
Commit: c53d9694fab44068e131ca398458287f66b3abf0
Parents: bdbee44
Author: Dan Burkert <danburkert@apache.org>
Authored: Fri Nov 4 13:14:14 2016 -0700
Committer: Dan Burkert <danburkert@apache.org>
Committed: Fri Nov 4 22:15:30 2016 +0000

----------------------------------------------------------------------
 CMakeLists.txt                   |  4 ++--
 cmake_modules/FindKdc.cmake      | 36 ---------------------------------
 cmake_modules/FindKerberos.cmake | 38 +++++++++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/c53d9694/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d44f29..92cd46f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -911,8 +911,8 @@ endif()
 
 ## Kerberos
 if (NOT NO_TESTS)
-  ## We rely on the Kerberos KDC binary for testing security.
-  find_package(Kdc)
+  ## We rely on the Kerberos binaries for testing security.
+  find_package(Kerberos)
 endif()
 
 ## Boost

http://git-wip-us.apache.org/repos/asf/kudu/blob/c53d9694/cmake_modules/FindKdc.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/FindKdc.cmake b/cmake_modules/FindKdc.cmake
deleted file mode 100644
index 6d0d4a8..0000000
--- a/cmake_modules/FindKdc.cmake
+++ /dev/null
@@ -1,36 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-# - Find Kerberos KDC
-# This module defines
-# KDC_BIN - the Kerberos KDC binary
-# KDC_BIN_FOUND- set to true if the Kerberos KDC binary is found
-
-find_program(KDC_BIN krb5kdc
-             PATHS
-             # Linux install location.
-             /usr/sbin
-             # Homebrew install location.
-             /usr/local/opt/krb5/sbin
-             # Macports install location.
-             /opt/local/sbin
-             # SLES
-             /usr/lib/mit/sbin)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Kdc REQUIRED_VARS KDC_BIN
-  FAIL_MESSAGE "Kerberos not found: security tests will fail")

http://git-wip-us.apache.org/repos/asf/kudu/blob/c53d9694/cmake_modules/FindKerberos.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/FindKerberos.cmake b/cmake_modules/FindKerberos.cmake
new file mode 100644
index 0000000..87b1655
--- /dev/null
+++ b/cmake_modules/FindKerberos.cmake
@@ -0,0 +1,38 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# - Find Kerberos
+# This module ensures that the Kerberos binaries depended on by tests are
+# present on the system.
+
+include(FindPackageHandleStandardArgs)
+set(bins kadmin.local kdb5_util kdestroy kinit klist krb5kdc)
+
+foreach(bin ${bins})
+  find_program(${bin} ${bin} PATHS
+               # Linux install location.
+               /usr/sbin
+               # Homebrew install location.
+               /usr/local/opt/krb5/sbin
+               # Macports install location.
+               /opt/local/sbin
+               # SLES
+               /usr/lib/mit/sbin)
+endforeach(bin)
+
+find_package_handle_standard_args(Kerberos REQUIRED_VARS ${bins}
+  FAIL_MESSAGE "Kerberos binaries not found: security tests will fail")


Mime
View raw message