GNU bug report logs - #24783
25.1 launchs gpg-agent --homedir as ~/.emacs.d/elpa/gnupg

Previous Next

Package: emacs;

Reported by: Fkqqrr <fkqqrr <at> riseup.net>

Date: Mon, 24 Oct 2016 15:31:02 UTC

Severity: normal

Tags: notabug

Found in version 25.1

Done: Daiki Ueno <ueno <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 24783 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: Fkqqrr <fkqqrr <at> riseup.net>
Cc: 24783 <at> debbugs.gnu.org
Subject: Re: bug#24783: 25.1 launchs gpg-agent --homedir as
 ~/.emacs.d/elpa/gnupg
Date: Sat, 12 Nov 2016 09:14:16 -0500
Fkqqrr <fkqqrr <at> riseup.net> writes:

> I am running Emacs 25.1 under Gentoo.
>
> Each time I run `list-packages', Emacs 25.1 launchs Gnupg-2.1 gpg-agent,
> but the `--homedir' argument is set to `~/.emacs.d/elpa/gnupg' though I
> have it to `~/.gnupg' in `~/.gnupg/gpg-agent.conf'.
>

According to `(gnupg) Agent Options':

'--homedir DIR'
     Set the name of the home directory to DIR.  If this option is not
     used, the home directory defaults to '~/.gnupg'.  It is only
     recognized when given on the command line.

So setting this in gpg-agent.conf wouldn't work (which makes sense,
since you need to know the homedir in order to find the configuration
file).

>
> However if `gpg-agent' is launched before `list-package', Emacs 25.1
> will respect that.

There is some code package.el that changes the gpg homedir:

(defun package-import-keyring (&optional file)
  "Import keys from FILE."
  (interactive "fFile: ")
  (setq file (expand-file-name file))
  (let ((context (epg-make-context 'OpenPGP))
        (homedir (expand-file-name "gnupg" package-user-dir)))
    (with-file-modes 448
      (make-directory homedir t))
    (setf (epg-context-home-directory context) homedir)
    (message "Importing %s..." (file-name-nondirectory file))
    (epg-import-keys-from-file context file)
    (message "Importing %s...done" (file-name-nondirectory file))))

Perhaps this setf should be a letf instead?




This bug report was last modified 8 years and 184 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.