From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#37556: gpg "-unknown" version string Date: Mon, 30 Sep 2019 00:59:18 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d0f9fc0593b913cc" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="108353"; mail-complaints-to="usenet@blaine.gmane.org" Cc: larsi@gnus.org To: 37556@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 30 01:01:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iEiBj-000S62-EU for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Sep 2019 01:01:11 +0200 Original-Received: from localhost ([::1]:42616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEiBi-0005Jq-5G for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2019 19:01:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39822) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEiBb-0005Ji-Hp for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 19:01:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iEiBa-0007fD-7C for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 19:01:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47259) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iEiBa-0007f9-4S for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 19:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iEiBZ-0005xU-VJ; Sun, 29 Sep 2019 19:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: larsi@gnus.org, bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Sep 2019 23:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37556 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Bug-Gnu-Emacs X-Debbugs-Original-Xcc: larsi@gnus.org Original-Received: via spool by submit@debbugs.gnu.org id=B.156979800222676 (code B ref -1); Sun, 29 Sep 2019 23:01:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Sep 2019 23:00:02 +0000 Original-Received: from localhost ([127.0.0.1]:56080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEiAb-0005tJ-51 for submit@debbugs.gnu.org; Sun, 29 Sep 2019 19:00:01 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:44672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iEiAY-0005tA-PC for submit@debbugs.gnu.org; Sun, 29 Sep 2019 18:59:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39690) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEiAX-0005Bw-3X for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 18:59:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iEiAV-00076p-Iz for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 18:59:56 -0400 Original-Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]:33252) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iEiAV-00076Z-Av for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 18:59:55 -0400 Original-Received: by mail-qt1-x82c.google.com with SMTP id r5so14650040qtd.0 for ; Sun, 29 Sep 2019 15:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=rzKS8IYmlTv9CuQWD39f5QzGEcpz13+gSspwi3lKKI8=; b=Q6Gv/nbcJ7OVio8ly1w3LVspvWdfO2dbet/PkW0LCHCAR7ca4p38MSkf2f+7n3Kqpw BcN1D7kBH8OgsCftO6RW7Nmv/ncDvju+pfgWH1JgPdmNKIl3o1o82bECRsNBO8njX9iz VX9AQwMY547vXI5EozZbDOK8IiiYuqu2yid5r5wb8Qkn/YhiZX4HsIYPWWcMCXxFMtSJ 0C5hnz3NunxBryxwcRqJ7gO9Kvgt8oPAk83sT47k44LXEnQSK9+g7fnbmVeGJIRfimCK 7LC3YA1mxIcpE2kbuqUM1k5JUMqpm6s2bEYOgJvsSID8PDMC4n4fESOYMWS+tI08pgCr SIuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=rzKS8IYmlTv9CuQWD39f5QzGEcpz13+gSspwi3lKKI8=; b=iANg/UCg1GxwFp37uNew7rZ5WTPLqm0I8UsR4JEVDM9bPneAhyHx3nmIiV4Ye+ReWn Hnp4tMhwwwkEuHKwSd/MrIxCQvwjYzTnZmlaliWqll9vvttwJuMchoYyBX1MPzk/Wy3d lEo6/p1NcxefPXzGcZY1N06x0qH5xB4nx4Da6DDl4TMsghWI9IvX86oBI/CWWCvuq2UG 8qAuoYsLKMuZ9zRW+NuHaMabKGSlAAtoVsBavoeDBSzc7Og0ox2wv8oM60QetGNT79xM jJfvY6+trRqbZZGf92fTBUTOD+ETbbRK8dQvi7OrGjhgPejNYtWosHgyX+X03RqCxFDc SbnQ== X-Gm-Message-State: APjAAAWRl8JsIRF51VCQRZgGL4Fg3dBiwZc6f7E28shH0IUeXq9cJqFD Q8r+QnVrrhDkYCBOUYGXrF+rvtl+3Dcfqnedr6odrzob X-Google-Smtp-Source: APXvYqyQ5NUevdHvtPaUc5EtKeI/XiFmtBjTy7v3ql4JE63meUtfnLZ58U1RYRCqwY3ON75bWNonUY/jwlOxWTnTVhM= X-Received: by 2002:a05:6214:70c:: with SMTP id b12mr18004819qvz.87.1569797994247; Sun, 29 Sep 2019 15:59:54 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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: 209.51.188.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:167765 Archived-At: --000000000000d0f9fc0593b913cc Content-Type: text/plain; charset="UTF-8" Package: emacs Version: 27.0.50 X-Debbugs-Cc: larsi@gnus.org This is related to bug# 35629. This commit commit 42ba6200af10c00c72ac13912d6fb42a7af88058 Author: Lars Ingebrigtsen Date: 2019-08-26 08:02:31 +0200 Allow finding gpg2 binaries when gpg2 has an "unknown" version string * lisp/epg-config.el (epg-find-configuration): Allow finding a usable configuration even if the version string looks like "gpg (GnuPG) 2.2.15-unknown" (bug#35629). fixes one function, but there are other uses of version-related functions in epg, for example (defun epg-required-version-p (protocol required-version) "Verify a sufficient version of GnuPG for specific protocol. PROTOCOL is symbol, either `OpenPGP' or `CMS'. REQUIRED-VERSION is a string containing the required version number. Return non-nil if that version or higher is installed." (let ((version (cdr (assq 'version (epg-find-configuration protocol))))) (and (stringp version) (version<= required-version version)))) which calls epg-find-configuration (which is protected by the above change), and then version<= (which fails). This makes epg-tests.el fail on my gpg, from MSYS2: $ gpg --version gpg (GnuPG) 2.2.17-unknown libgcrypt 1.8.4 Fixing this with another let binding around `version<=' is trivial, but it is a kludge. I think it makes more sense just adding "-unknown" to the formats recognized by default with version-regexp-alist. (Note: after working around this bug, epg tests still fail for me, but for unrelated reasons.) --000000000000d0f9fc0593b913cc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Package: emacs
Version: 27.0.50
X= -Debbugs-Cc:=C2=A0larsi@gnus.org



This is related to bug# 35629= .

This commit

=C2=A0 =C2=A0commit 42ba6200af10c00c72ac13912d6= fb42a7af88058
=C2=A0 =C2=A0Author: Lars Ingebrigtsen <larsi@gnus.org>
=C2=A0 =C2=A0Date: =C2=A0 2019= -08-26 08:02:31 +0200

=C2=A0 =C2=A0 =C2=A0 =C2=A0Allow finding gpg2 = binaries when gpg2 has an "unknown" version string

=C2=A0 = =C2=A0 =C2=A0 =C2=A0* lisp/epg-config.el (epg-find-configuration): Allow fi= nding a
=C2=A0 =C2=A0 =C2=A0 =C2=A0usable configuration even if the vers= ion string looks like "gpg
=C2=A0 =C2=A0 =C2=A0 =C2=A0(GnuPG) 2.2.1= 5-unknown" (bug#35629).

fixes one function, but there are other= uses of version-related functions in epg, for example

(= defun epg-required-version-p (protocol required-version)
=C2=A0 "Ve= rify a sufficient version of GnuPG for specific protocol.
PROTOCOL is sy= mbol, either `OpenPGP' or `CMS'.=C2=A0 REQUIRED-VERSION
is a str= ing containing the required version number.=C2=A0 Return
non-nil if that= version or higher is installed."
=C2=A0 (let ((version (cdr (assq = 'version (epg-find-configuration protocol)))))
=C2=A0 =C2=A0 (and (s= tringp version)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(version<=3D requir= ed-version version))))

which calls epg-find-co= nfiguration (which is protected by the above change), and then version<= =3D (which fails).

This makes epg-tests.el fail on= my gpg, from MSYS2:

$ gpg --version
gpg (GnuPG= ) 2.2.17-unknown
libgcrypt 1.8.4

Fixing thi= s with another let binding around `version<=3D' is trivial, but it i= s a kludge.

I think it makes more sense just addin= g "-unknown" to the formats recognized by default with version-re= gexp-alist.

(Note: after working around this bug, = epg tests still fail for me, but for unrelated reasons.)

--000000000000d0f9fc0593b913cc--