unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 26f9a77: * etc/package-keyring.gpg: Add the 2019 key
       [not found] ` <20190423203704.C1B1F207D5@vcs0.savannah.gnu.org>
@ 2019-04-26  8:22   ` Robert Pluim
  2019-04-26 11:57     ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Pluim @ 2019-04-26  8:22 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Monnier

>>>>> On Tue, 23 Apr 2019 16:37:04 -0400 (EDT), monnier@iro.umontreal.ca (Stefan Monnier) said:

    Stefan> branch: master commit
    Stefan> 26f9a77f2478fb73bc82f12b3285c5f8cd7eb9f3 Author: Stefan
    Stefan> Monnier <monnier@iro.umontreal.ca> Commit: Stefan Monnier
    Stefan> <monnier@iro.umontreal.ca>

    Stefan>     * etc/package-keyring.gpg: Add the 2019 key ---
    Stefan> etc/package-keyring.gpg | Bin 999 -> 2069 bytes 1 file
    Stefan> changed, 0 insertions(+), 0 deletions(-)

So I installed the gnu-elpa-keyring-update package, and now I get

    Importing gnu-elpa-keyring.gpg...
    Importing gnu-elpa-keyring.gpg...done

on stdout when I start emacs. How about something like this:

diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 61cf690697..dfef0e6b3b 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -1529,9 +1529,11 @@ package-import-keyring
       (with-file-modes 448
         (make-directory package-gnupghome-dir t))
       (setf (epg-context-home-directory context) package-gnupghome-dir))
-    (message "Importing %s..." (file-name-nondirectory file))
+    (when (called-interactively-p 'interactive)
+      (message "Importing %s..." (file-name-nondirectory file)))
     (epg-import-keys-from-file context file)
-    (message "Importing %s...done" (file-name-nondirectory file))))
+    (when (called-interactively-p 'interactive)
+      (message "Importing %s...done" (file-name-nondirectory file)))))
 
 (defvar package--post-download-archives-hook nil
   "Hook run after the archive contents are downloaded.




^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: master 26f9a77: * etc/package-keyring.gpg: Add the 2019 key
  2019-04-26  8:22   ` master 26f9a77: * etc/package-keyring.gpg: Add the 2019 key Robert Pluim
@ 2019-04-26 11:57     ` Stefan Monnier
  2019-04-26 14:17       ` Robert Pluim
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2019-04-26 11:57 UTC (permalink / raw)
  To: emacs-devel

> So I installed the gnu-elpa-keyring-update package,

Thanks ;-)

> and now I get
>
>     Importing gnu-elpa-keyring.gpg...
>     Importing gnu-elpa-keyring.gpg...done
>
> on stdout when I start emacs.

Sounds like a bug: the import should have taken place during the
installation (more specifically during the compilation) of
gnu-elpa-keyring-update and it should not need to be performed "ever
again".  And if for some reason it didn't happen during installation, it
should happen at the next startup but not at the subsequent ones.

So could you try and figure out why it happens every time you
start Emacs?

For that, you'll probably want to manually edit
~/.emacs.d/elpa/gnu-elpa-keyring-update-2019.1/gnu-elpa-keyring-update-autoloads.el
to add various `message` calls within the (eval-after-load 'package ...).


        Stefan



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: master 26f9a77: * etc/package-keyring.gpg: Add the 2019 key
  2019-04-26 11:57     ` Stefan Monnier
@ 2019-04-26 14:17       ` Robert Pluim
  2019-04-26 14:45         ` Robert Pluim
  2019-04-26 17:38         ` Stefan Monnier
  0 siblings, 2 replies; 10+ messages in thread
From: Robert Pluim @ 2019-04-26 14:17 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

>>>>> On Fri, 26 Apr 2019 07:57:54 -0400, Stefan Monnier <monnier@IRO.UMontreal.CA> said:

    Stefan> Sounds like a bug: the import should have taken place
    Stefan> during the installation (more specifically during the
    Stefan> compilation) of gnu-elpa-keyring-update and it should not
    Stefan> need to be performed "ever again".  And if for some reason
    Stefan> it didn't happen during installation, it should happen at
    Stefan> the next startup but not at the subsequent ones.

    Stefan> So could you try and figure out why it happens every time
    Stefan> you start Emacs?

There is a bug somewhere, but itʼs not clear where:

- when I installed gnu-elpa-keyring-update, I was prompted for a gpg key
to use to encrypt. I chose one, which meant that
gnu-elpa-keyring-update-2019.1/etc/gnu-elpa-keyring.gpg
ended up encrypted, and gpg could not import it.

- I manually decrypted gnu-elpa-keyring.gpg, and relaunched emacs.

- This time, epg debug shows that gpg imported something:

GPG_AGENT_INFO is not set
/usr/local/bin/gpg2 --no-tty --status-fd 1 --yes --homedir /Users/rpluim/.emacs.d/elpa/gnupg --command-fd 0 --import -- /Users/rpluim/.emacs.d/elpa/gnu-elpa-keyring-update-2019.1/etc/gnu-elpa-keyring.gpg
[GNUPG:] IMPORT_OK 0 CA442C00F91774F17F59D9B0474F05837FBDEF9B
[GNUPG:] KEY_CONSIDERED CA442C00F91774F17F59D9B0474F05837FBDEF9B 0
[GNUPG:] KEY_CONSIDERED CA442C00F91774F17F59D9B0474F05837FBDEF9B 0
[GNUPG:] IMPORT_OK 0 C433554766D3DDC64221BFAA066DAFCB81E42C40
[GNUPG:] KEY_CONSIDERED C433554766D3DDC64221BFAA066DAFCB81E42C40 0
[GNUPG:] IMPORT_RES 2 0 0 0 2 0 0 0 0 0 0 0 0 0 0


- However, emacs still tries to re-import the updated keyring when I
restart it

- I was expecting .emacs.d/elpa/gnupg/pubring.gpg to change, but it
  hasn't changed in size, nor has its timestamp. pubring.kbx *has*
  changed however
  
Could this be a gpg issue?

Robert



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: master 26f9a77: * etc/package-keyring.gpg: Add the 2019 key
  2019-04-26 14:17       ` Robert Pluim
@ 2019-04-26 14:45         ` Robert Pluim
  2019-04-26 17:38         ` Stefan Monnier
  1 sibling, 0 replies; 10+ messages in thread
From: Robert Pluim @ 2019-04-26 14:45 UTC (permalink / raw)
  To: emacs-devel

>>>>> On Fri, 26 Apr 2019 16:17:22 +0200, Robert Pluim <rpluim@gmail.com> said:

    Robert> - I was expecting .emacs.d/elpa/gnupg/pubring.gpg to
    Robert> change, but it hasn't changed in size, nor has its
    Robert> timestamp. pubring.kbx *has* changed however

One more data point, if I re-run the import, then gpg indicates the
new key is already there:

/usr/local/bin/gpg2 --no-tty --status-fd 1 --yes --homedir /Users/rpluim/.emacs.d/elpa/gnupg --command-fd 0 --import -- /Users/rpluim/.emacs.d/elpa/gnu-elpa-keyring-update-2019.1/etc/gnu-elpa-keyring.gpg
[GNUPG:] IMPORT_OK 0 CA442C00F91774F17F59D9B0474F05837FBDEF9B
[GNUPG:] KEY_CONSIDERED CA442C00F91774F17F59D9B0474F05837FBDEF9B 0
gpg: key 474F05837FBDEF9B: "GNU ELPA Signing Agent (2014) <elpasign@elpa.gnu.org>" not changed
[GNUPG:] KEY_CONSIDERED CA442C00F91774F17F59D9B0474F05837FBDEF9B 0
[GNUPG:] IMPORT_OK 0 C433554766D3DDC64221BFAA066DAFCB81E42C40
[GNUPG:] KEY_CONSIDERED C433554766D3DDC64221BFAA066DAFCB81E42C40 0
gpg: key 066DAFCB81E42C40: "GNU ELPA Signing Agent (2019) <elpasign@elpa.gnu.org>" not changed
gpg: Total number processed: 2
gpg:              unchanged: 2
[GNUPG:] IMPORT_RES 2 0 0 0 2 0 0 0 0 0 0 0 0 0 0

So I think that checking pubring.gpg is perhaps the wrong thing to do
when using gpg2, which is supported by the 'Faster Keyring Format'
section of <https://gnupg.org/faq/whats-new-in-2.1.html>

Robert



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: master 26f9a77: * etc/package-keyring.gpg: Add the 2019 key
  2019-04-26 14:17       ` Robert Pluim
  2019-04-26 14:45         ` Robert Pluim
@ 2019-04-26 17:38         ` Stefan Monnier
  2019-04-27  7:33           ` Robert Pluim
  1 sibling, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2019-04-26 17:38 UTC (permalink / raw)
  To: emacs-devel

> There is a bug somewhere, but itʼs not clear where:
>
> - when I installed gnu-elpa-keyring-update, I was prompted for a gpg key
>   to use to encrypt.

Huh?  That's a bug.  Sounds like a false positive for epa-file-handler.

> - However, emacs still tries to re-import the updated keyring when I
> restart it
>
> - I was expecting .emacs.d/elpa/gnupg/pubring.gpg to change, but it
>   hasn't changed in size, nor has its timestamp. pubring.kbx *has*
>   changed however

Hmm... I guess the key was added to that keyring beforehand anyway, so
your pubring.gpg isn't modified and hence it stays older than the file
in gnu-elpa-keyring-update.

OK, thanks, I think I should be able to reproduce both the
above problems.


        Stefan



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: master 26f9a77: * etc/package-keyring.gpg: Add the 2019 key
  2019-04-26 17:38         ` Stefan Monnier
@ 2019-04-27  7:33           ` Robert Pluim
  2019-04-29 21:20             ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Pluim @ 2019-04-27  7:33 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

>>>>> On Fri, 26 Apr 2019 13:38:30 -0400, Stefan Monnier <monnier@iro.umontreal.ca> said:

    >> There is a bug somewhere, but itʼs not clear where:
    >> 
    >> - when I installed gnu-elpa-keyring-update, I was prompted for
    >> a gpg key to use to encrypt.

    Stefan> Huh?  That's a bug.  Sounds like a false positive for
    Stefan> epa-file-handler.

auto-mode-alist has  ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file)
, so Iʼm not too surprised.

    >> - However, emacs still tries to re-import the updated keyring
    >> when I restart it
    >> 
    >> - I was expecting .emacs.d/elpa/gnupg/pubring.gpg to change,
    >> but it hasn't changed in size, nor has its
    >> timestamp. pubring.kbx *has* changed however

    Stefan> Hmm... I guess the key was added to that keyring
    Stefan> beforehand anyway, so your pubring.gpg isn't modified and
    Stefan> hence it stays older than the file in
    Stefan> gnu-elpa-keyring-update.

Yes, that sounds about right.

    Stefan> OK, thanks, I think I should be able to reproduce both the
    Stefan> above problems.

I can test whatever you come up with.

Robert



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: master 26f9a77: * etc/package-keyring.gpg: Add the 2019 key
  2019-04-27  7:33           ` Robert Pluim
@ 2019-04-29 21:20             ` Stefan Monnier
  2019-04-30  7:33               ` Robert Pluim
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2019-04-29 21:20 UTC (permalink / raw)
  To: emacs-devel

>     Stefan> OK, thanks, I think I should be able to reproduce both the
>     Stefan> above problems.
> I can test whatever you come up with.

There's a gnu-elpa-keyring-update version 2019.3 which should appear
within 12 hours or so which you can try.  It should fix those
two problems (the encrypted .gpg keyring and the repeated updates).


        Stefan




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: master 26f9a77: * etc/package-keyring.gpg: Add the 2019 key
  2019-04-29 21:20             ` Stefan Monnier
@ 2019-04-30  7:33               ` Robert Pluim
  2019-04-30  9:25                 ` Robert Pluim
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Pluim @ 2019-04-30  7:33 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

>>>>> On Mon, 29 Apr 2019 17:20:51 -0400, Stefan Monnier <monnier@iro.umontreal.ca> said:

    Stefan> OK, thanks, I think I should be able to reproduce both the
    Stefan> above problems.
    >> I can test whatever you come up with.

    Stefan> There's a gnu-elpa-keyring-update version 2019.3 which
    Stefan> should appear within 12 hours or so which you can try.  It
    Stefan> should fix those two problems (the encrypted .gpg keyring
    Stefan> and the repeated updates).

Thereʼs a .2 which I just installed, which fixes the first issue, but
not the second:

$ Importing gnu-elpa.gpg-keyring...
Importing gnu-elpa.gpg-keyring...done
Error loading autoloads: (void-variable hd)

I guess you meant to say

      (write-region "" nil (expand-file-name "gnu-elpa.timestamp" gnupghome-dir)
      
in gnu-elpa-keyring-update.el. If I make that change, it installs the
key once, and then doesnʼt bother me again.

Whilst looking into this, I deleted the gnu-elpa-keyring-update
package, and tried to re-install it, which failed with:

package-install-from-archive:
https://elpa.gnu.org/packages/gnu-elpa-keyring-update-2019.2.tar: Not
modified

I had to delete the url cache under .elpa.d/url/cache to get it
installed. Would you like a bug report about that?

Robert



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: master 26f9a77: * etc/package-keyring.gpg: Add the 2019 key
  2019-04-30  7:33               ` Robert Pluim
@ 2019-04-30  9:25                 ` Robert Pluim
  2019-04-30 12:09                   ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Robert Pluim @ 2019-04-30  9:25 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Monnier

>>>>> On Tue, 30 Apr 2019 09:33:14 +0200, Robert Pluim <rpluim@gmail.com> said:

>>>>> On Mon, 29 Apr 2019 17:20:51 -0400, Stefan Monnier <monnier@iro.umontreal.ca> said:
    Stefan> OK, thanks, I think I should be able to reproduce both the
    Stefan> above problems.
    >>> I can test whatever you come up with.

    Stefan> There's a gnu-elpa-keyring-update version 2019.3 which
    Stefan> should appear within 12 hours or so which you can try.  It
    Stefan> should fix those two problems (the encrypted .gpg keyring
    Stefan> and the repeated updates).

    Robert> Thereʼs a .2 which I just installed, which fixes the first
    Robert> issue, but not the second:

And .3 just came out, which fixes both problems.

Thanks

Robert



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: master 26f9a77: * etc/package-keyring.gpg: Add the 2019 key
  2019-04-30  9:25                 ` Robert Pluim
@ 2019-04-30 12:09                   ` Stefan Monnier
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2019-04-30 12:09 UTC (permalink / raw)
  To: emacs-devel

> And .3 just came out, which fixes both problems.

Thank you for testing!


        Stefan



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-04-30 12:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20190423203703.26844.27107@vcs0.savannah.gnu.org>
     [not found] ` <20190423203704.C1B1F207D5@vcs0.savannah.gnu.org>
2019-04-26  8:22   ` master 26f9a77: * etc/package-keyring.gpg: Add the 2019 key Robert Pluim
2019-04-26 11:57     ` Stefan Monnier
2019-04-26 14:17       ` Robert Pluim
2019-04-26 14:45         ` Robert Pluim
2019-04-26 17:38         ` Stefan Monnier
2019-04-27  7:33           ` Robert Pluim
2019-04-29 21:20             ` Stefan Monnier
2019-04-30  7:33               ` Robert Pluim
2019-04-30  9:25                 ` Robert Pluim
2019-04-30 12:09                   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).