From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.bugs Subject: bug#22440: 25.1.50; package.el fails to install with package-check-signature t Date: Wed, 18 May 2016 16:33:04 -0300 Message-ID: <87k2ir6u1b.fsf@gmail.com> References: <87a8nxxgqu.fsf@udel.edu> <57381F2D.70007@cs.ucla.edu> <3ea72c05-4bdb-3301-aead-ea7eb25947bc@yandex.ru> <5738A8D5.5030206@cs.ucla.edu> <1fe8c642-202d-a037-5125-8fb733e5f414@yandex.ru> <20160518164405.GA9932@holos.localdomain> <87vb2b6ufy.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1463600076 20279 80.91.229.3 (18 May 2016 19:34:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 May 2016 19:34:36 +0000 (UTC) Cc: Mark Oteiza , ueno@gnu.org, 22440@debbugs.gnu.org, Dmitry Gutov To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 18 21:34:23 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b37Ea-00051x-Aq for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 May 2016 21:34:20 +0200 Original-Received: from localhost ([::1]:46816 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b37EZ-0002Vu-MN for geb-bug-gnu-emacs@m.gmane.org; Wed, 18 May 2016 15:34:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b37EO-0002TW-Cw for bug-gnu-emacs@gnu.org; Wed, 18 May 2016 15:34:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b37EI-0003rn-CR for bug-gnu-emacs@gnu.org; Wed, 18 May 2016 15:34:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b37EI-0003rj-90 for bug-gnu-emacs@gnu.org; Wed, 18 May 2016 15:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b37EI-0000Hi-0y for bug-gnu-emacs@gnu.org; Wed, 18 May 2016 15:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Artur Malabarba Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 May 2016 19:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22440 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: security Original-Received: via spool by 22440-submit@debbugs.gnu.org id=B22440.14636000001043 (code B ref 22440); Wed, 18 May 2016 19:34:01 +0000 Original-Received: (at 22440) by debbugs.gnu.org; 18 May 2016 19:33:20 +0000 Original-Received: from localhost ([127.0.0.1]:57284 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b37Dc-0000Gl-Kx for submit@debbugs.gnu.org; Wed, 18 May 2016 15:33:20 -0400 Original-Received: from mail-qg0-f54.google.com ([209.85.192.54]:33104) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b37Db-0000GZ-B6 for 22440@debbugs.gnu.org; Wed, 18 May 2016 15:33:19 -0400 Original-Received: by mail-qg0-f54.google.com with SMTP id f92so31775966qgf.0 for <22440@debbugs.gnu.org>; Wed, 18 May 2016 12:33:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=MEigMIn6gDLkouElbY/PGB4L7YkDs0skS2Kyk3fDCYc=; b=tWvA4V1x0t/As95SffLJd5HNkD1S/M0nwFM5OCVkLvjkUsdY0uxnS2uBv32ptPrWfg yaT4gCXId/FxmWzU31B4AM6wHfPsU2MNokHwF5Oa0bKEbBcfS6YbNGk+dFX0Q9wm0ZAW f+8OR6ZHajATEJz7TapHHR00Z/kW0wnKRDhhKDDvLAaOzPi+HUeENbsFRdNI3f6Fs7ex PAfFM6Nmx11n0elPZKxF2d5ZmyjQ/jHS/g10pLzwTHnrP6gXdZFXPPAuCGGxgfInNjcJ Emm3O/R25VAUu/iIxrilU9ID4yibWPnXnuDx65FPKjKAu4WSp5NMJVuZ72N3AwB77juH okAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=MEigMIn6gDLkouElbY/PGB4L7YkDs0skS2Kyk3fDCYc=; b=HDWp1iG/JtsZ4dT1C0C+euZyFjzz/y50oY3E//PdErkTQVtdzyOOX0Z9NljA18UlCI i6wP7Dje7uv3AGLbLTH1htSRzFDl81yzt+tBiJ+csvSB+lbpK0Tp9pPIzvgtT0kxIb+M B16ut8pN4u4uAAS8vtG1azGSlL1K9yUL/mUstuphW9kGt6GeQQ96w2btBFoptpcf+npx t0W2sDGBLSXiXGa6kSP/Be+koaBVGPNuL3tchc5w2WCHQf/KYob7Ec/wZFstQLvZ+miq X1YhaQ99QSdOYR0lsEnXSuQbnpyRy5kj3DbhUd4IWTqeRXnaNn9G5uFL/8+zrLN/6Cod +r5A== X-Gm-Message-State: AOPr4FXQIwCgyx4c5ZDjxVK06wNR2aEtVLilRRIitTWHmORQtkYxtFT8x96N/gcxjOwDpg== X-Received: by 10.140.154.137 with SMTP id a131mr10189769qha.8.1463599993909; Wed, 18 May 2016 12:33:13 -0700 (PDT) Original-Received: from Gandalf-Linux.gmail.com ([179.184.224.5]) by smtp.gmail.com with ESMTPSA id r1sm2810778qkl.27.2016.05.18.12.33.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 May 2016 12:33:13 -0700 (PDT) In-Reply-To: <87vb2b6ufy.fsf@gmail.com> (Artur Malabarba's message of "Wed, 18 May 2016 16:24:17 -0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118412 Archived-At: Artur Malabarba writes: > Paul Eggert writes: > >> I observed the same thing, but as I have no idea how packages ought to work I didn't know whether that was expected. If not, it's a bug too -- >> should it get a different bug report or is this all the same bug? > > Yes, it's a bug. Looks like it was introduced by the commit below. > I've CC'd Daiki. Here's a proposed fix. --- Author: Artur Malabarba * lisp/emacs-lisp/package.el (package-refresh-contents): Don't change the value of `package-check-signature'. (package-check-signature): Use `epg-find-configuration' instead of `executable-find'. 1 file changed, 6 insertions(+), 10 deletions(-) lisp/emacs-lisp/package.el | 16 ++++++---------- modified lisp/emacs-lisp/package.el @@ -302,10 +302,12 @@ package-directory-list :risky t :version "24.1") -(defvar epg-gpg-program) +(declare-function epg-find-configuration "epg-config" + (protocol &optional force)) (defcustom package-check-signature - (if (progn (require 'epg-config) (executable-find epg-gpg-program)) + (if (and (require 'epg-config) + (epg-find-configuration 'OpenPGP)) 'allow-unsigned) "Non-nil means to check package signatures when installing. The value `allow-unsigned' means to still install a package even if @@ -1457,8 +1459,6 @@ package-initialize (defvar package--downloads-in-progress nil "List of in-progress asynchronous downloads.") -(declare-function epg-find-configuration "epg-config" - (protocol &optional force)) (declare-function epg-import-keys-from-file "epg" (context keys)) ;;;###autoload @@ -1558,12 +1558,8 @@ package-refresh-contents (let ((default-keyring (expand-file-name "package-keyring.gpg" data-directory)) (inhibit-message async)) - (if (get 'package-check-signature 'saved-value) - (when package-check-signature - (epg-find-configuration 'OpenPGP)) - (setq package-check-signature - (if (epg-find-configuration 'OpenPGP) - 'allow-unsigned))) + (when package-check-signature + (epg-find-configuration 'OpenPGP)) (when (and package-check-signature (file-exists-p default-keyring)) (condition-case-unless-debug error (package-import-keyring default-keyring)