From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.42.229.71 with SMTP id jh7cs147089icb; Tue, 18 Jan 2011 11:22:59 -0800 (PST) Received: by 10.150.144.10 with SMTP id r10mr1428207ybd.66.1295378579075; Tue, 18 Jan 2011 11:22:59 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id my6si12353487qcb.38.2011.01.18.11.22.58; Tue, 18 Jan 2011 11:22:59 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 47D271858357; Tue, 18 Jan 2011 14:22:44 -0500 (EST) Received: from smtp.chost.de (setoy.chost.de [217.160.209.225]) by rubyforge.org (Postfix) with ESMTP id 4852D185831A for ; Tue, 18 Jan 2011 13:20:47 -0500 (EST) Received: (qmail 29964 invoked by uid 5015); 18 Jan 2011 18:20:55 -0000 Received: (nullmailer pid 31383 invoked by uid 8193); Tue, 18 Jan 2011 18:20:46 -0000 Received: (nullmailer pid 2142 invoked by uid 8193); Tue, 18 Jan 2011 18:20:43 -0000 From: Sascha Silbe To: sup-devel Date: Tue, 18 Jan 2011 19:20:21 +0100 Message-Id: <1295374821-1403-1-git-send-email-sascha-pgp@silbe.org> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1294776647-sup-7357@meteor.durcheinandertal.local> References: <1294776647-sup-7357@meteor.durcheinandertal.local> Mail-Followup-To: Subject: [sup-devel] [PATCH v2] prefer gpg2 (GnuPG 2.x) over gpg (GnuPG 1.x) X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sascha Silbe , Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org Since 1.9.14 GnuPG can automatically start gpg-agent if it's not already running (using a well-known socket location). When using GnuPG 1.x gpg-agent needs to already be running at the time sup is started because the socket location is random and passed via environment variables. Autostarting gpg-agent is particularly convenient when using sup via ssh as gpg-agent would need to be started manually (for local X sessions OTOH it's often started automatically by distro scripts). Signed-off-by: Sascha Silbe --- v1->v2: rebase on next lib/sup/crypto.rb | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb index 02f14d0..f44efb3 100644 --- a/lib/sup/crypto.rb +++ b/lib/sup/crypto.rb @@ -48,6 +48,11 @@ EOS GPGME.check_version({:protocol => GPGME::PROTOCOL_OpenPGP}) rescue NameError, GPGME::Error @gpgme_present = false + return + end + + if (bin = `which gpg2`.chomp) =~ /\S/ + GPGME.set_engine_info GPGME::PROTOCOL_OpenPGP, bin, nil end end -- 1.7.2.3 _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel