Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 43B4A200BB6 for ; Fri, 4 Nov 2016 23:33:55 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 424A0160B04; Fri, 4 Nov 2016 22:33:55 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8AF1F160AFE for ; Fri, 4 Nov 2016 23:33:54 +0100 (CET) Received: (qmail 5128 invoked by uid 500); 4 Nov 2016 22:33:53 -0000 Mailing-List: contact commits-help@kudu.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kudu.apache.org Delivered-To: mailing list commits@kudu.apache.org Received: (qmail 5077 invoked by uid 99); 4 Nov 2016 22:33:53 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2016 22:33:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 62012DFE5C; Fri, 4 Nov 2016 22:33:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jdcryans@apache.org To: commits@kudu.apache.org Date: Fri, 04 Nov 2016 22:33:54 -0000 Message-Id: <5aa22f0f066b49c9b03a7b153b10db76@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/2] kudu git commit: cmake: search for all required Kerberos binaries archived-at: Fri, 04 Nov 2016 22:33:55 -0000 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 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 Authored: Fri Nov 4 13:14:14 2016 -0700 Committer: Dan Burkert 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")