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 80BFD200B87 for ; Fri, 12 Aug 2016 03:27:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7F450160A94; Fri, 12 Aug 2016 01:27:01 +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 CD2AB160AB4 for ; Fri, 12 Aug 2016 03:27:00 +0200 (CEST) Received: (qmail 9902 invoked by uid 500); 12 Aug 2016 01:27:00 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 9799 invoked by uid 99); 12 Aug 2016 01:27:00 -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, 12 Aug 2016 01:27:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D41B4E38E3; Fri, 12 Aug 2016 01:26:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ctubbsii@apache.org To: commits@accumulo.apache.org Date: Fri, 12 Aug 2016 01:27:02 -0000 Message-Id: <0bb8da261e3849c2842b73348d6280db@git.apache.org> In-Reply-To: <15589bac09e64981b3672c2429d4adb7@git.apache.org> References: <15589bac09e64981b3672c2429d4adb7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [04/10] accumulo git commit: ACCUMULO-4400 Best effort to reset gpg-agent cache archived-at: Fri, 12 Aug 2016 01:27:01 -0000 ACCUMULO-4400 Best effort to reset gpg-agent cache Make a best effort to reset gpg-agent cache, so that the signing key will stay cached throughout the full duration of the release candidate build, when created using build.sh Limitations: 1. This will force the password to be input at the beginning of the build.sh script, unless the user is using some persistent cache like gnome-keyring-daemon to manage one's key. 2. If the user pauses at the prompts later in the script, for a long period of time, the cache could still expire during execution, even if the cache is reset at the start of the script. 3. The build.sh script still presumes that gpg-agent is configured with a sufficiently large enough default-cache-ttl and max-cache-ttl values, so that the cache won't expire during the creation of the release candidate. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e1cd01fa Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e1cd01fa Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e1cd01fa Branch: refs/heads/master Commit: e1cd01facfc60d15004af20fcbb272d3a0dd6a07 Parents: 9bd3306 Author: Christopher Tubbs Authored: Thu Aug 11 21:12:15 2016 -0400 Committer: Christopher Tubbs Committed: Thu Aug 11 21:12:15 2016 -0400 ---------------------------------------------------------------------- assemble/build.sh | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/e1cd01fa/assemble/build.sh ---------------------------------------------------------------------- diff --git a/assemble/build.sh b/assemble/build.sh index 9bc0beb..86f73c5 100755 --- a/assemble/build.sh +++ b/assemble/build.sh @@ -42,6 +42,8 @@ currentBranch() { local b; b=$(git symbolic-ref -q HEAD) && echo "${b##refs/head cacheGPG() { # make sure gpg agent has key cached + # first clear cache, to reset timeouts (best attempt) + { hash gpg-connect-agent && gpg-connect-agent reloadagent /bye; } &>/dev/null # TODO prompt for key instead of using default? local TESTFILE; TESTFILE=$(mktemp --tmpdir "${USER}-gpgTestFile-XXXXXXXX.txt") [[ -r $TESTFILE ]] && "$gpgCommand" --sign "${TESTFILE}" && rm -f "${TESTFILE}" "${TESTFILE}.gpg"