* bug#25947: 26.0.50; EasyPG does not honor customized epg-gpg-program
@ 2017-03-03 11:34 Jens Lechtenboerger
2017-03-09 23:26 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Jens Lechtenboerger @ 2017-03-03 11:34 UTC (permalink / raw)
To: 25947
Hi there,
I'm experimenting with Emacs on Qubes OS with Split GPG [0], where I
need to redirect invocations of gpg to qubes-gpg-client-wrapper.
However, customizing epg-gpg-program does not work, recipe from
'emacs -Q':
Check value of epg-gpg-program; in my case, I see gpg2:
C-h v epg-gpg-program
Eval the following:
(setq epg-debug t)
(customize-set-variable 'epg-gpg-program "/bin/echo")
Invoke some EasyPG operation, e.g., encrypt a fresh file:
C-x C-f test.gpg
At this point, the debug buffer " *epg-debug*" shows that
/usr/bin/gpg was invoked for decryption. Note that this is neither
gpg2 (my machine's default) nor /bin/echo (my customization).
Continue:
M-x spook
C-x C-s
A buffer for key selection opens. It doesn't matter whether I
select a public key (if there is one) or go for symmetric
encryption. Leave that buffer:
C-c C-c
Enter a Passphrase (e.g., "test") twice in case of symmetric
encryption.
Notice that an encrypted file has been created.
Buffer " *epg-debug*" shows that /usr/bin/gpg was used for
encryption, not /bin/echo. It doesn't matter whether I use
customize or setq on epg-gpg-program.
As a workaround, I've got the following in my .emacs:
(require 'epg-config)
(setq epg-gpg-program "/usr/bin/qubes-gpg-client-wrapper")
(push (cons 'OpenPGP (epg-config--make-gpg-configuration epg-gpg-program))
epg--configurations)
Best wishes
Jens
In GNU Emacs 26.0.50 (build 1, x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2017-02-24 built on debian-8
Repository revision: 91932fff1ded8ed3b4d39dd06891f26960153b9e
[0] https://www.qubes-os.org/doc/split-gpg/
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#25947: 26.0.50; EasyPG does not honor customized epg-gpg-program
2017-03-03 11:34 bug#25947: 26.0.50; EasyPG does not honor customized epg-gpg-program Jens Lechtenboerger
@ 2017-03-09 23:26 ` Glenn Morris
2017-03-10 15:09 ` Jens Lechtenboerger
0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2017-03-09 23:26 UTC (permalink / raw)
To: Jens Lechtenboerger; +Cc: 25947, Daiki Ueno
Jens Lechtenboerger wrote:
> However, customizing epg-gpg-program does not work, recipe from
> 'emacs -Q':
>
> Check value of epg-gpg-program; in my case, I see gpg2:
> C-h v epg-gpg-program
>
> Eval the following:
> (setq epg-debug t)
> (customize-set-variable 'epg-gpg-program "/bin/echo")
>
> Invoke some EasyPG operation, e.g., encrypt a fresh file:
> C-x C-f test.gpg
>
> At this point, the debug buffer " *epg-debug*" shows that
> /usr/bin/gpg was invoked for decryption. Note that this is neither
> gpg2 (my machine's default) nor /bin/echo (my customization).
Thanks for the report. How about the following:
--- a/lisp/epg-config.el
+++ b/lisp/epg-config.el
@@ -129,7 +129,8 @@ epg-find-configuration
(or (and (not no-cache) (alist-get protocol epg--configurations))
;; If the executable value is already set with M-x
;; customize, use it without checking.
- (if (and symbol (get symbol 'saved-value))
+ (if (and symbol (or (get symbol 'saved-value)
+ (get symbol 'customized-value)))
(let ((configuration
(funcall constructor (symbol-value symbol))))
(push (cons protocol configuration) epg--configurations)
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#25947: 26.0.50; EasyPG does not honor customized epg-gpg-program
2017-03-09 23:26 ` Glenn Morris
@ 2017-03-10 15:09 ` Jens Lechtenboerger
2017-03-10 19:26 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Jens Lechtenboerger @ 2017-03-10 15:09 UTC (permalink / raw)
To: Glenn Morris; +Cc: 25947, Daiki Ueno
On 2017-03-09, Glenn Morris wrote:
> Thanks for the report. How about the following:
> [...]
Many thanks, this works for me with customize-set-variable.
However, the initial value of epg-gpg-program (gpg2 in my case) is
still ignored. (So if one wants to stick with the default value,
that does not work.)
Best wishes
Jens
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#25947: 26.0.50; EasyPG does not honor customized epg-gpg-program
2017-03-10 15:09 ` Jens Lechtenboerger
@ 2017-03-10 19:26 ` Glenn Morris
2017-03-11 14:05 ` Jens Lechtenboerger
0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2017-03-10 19:26 UTC (permalink / raw)
To: Jens Lechtenboerger; +Cc: 25947, Daiki Ueno
Jens Lechtenboerger wrote:
> However, the initial value of epg-gpg-program (gpg2 in my case) is
> still ignored.
What version of gpg2 do you have?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#25947: 26.0.50; EasyPG does not honor customized epg-gpg-program
2017-03-10 19:26 ` Glenn Morris
@ 2017-03-11 14:05 ` Jens Lechtenboerger
2017-03-12 1:27 ` Glenn Morris
0 siblings, 1 reply; 6+ messages in thread
From: Jens Lechtenboerger @ 2017-03-11 14:05 UTC (permalink / raw)
To: Glenn Morris; +Cc: 25947, Daiki Ueno
On March 10, 2017 8:26:38 PM CET, Glenn Morris <rgm@gnu.org> wrote:
>What version of gpg2 do you have?
I wont't have access to that machine before Monday, but I see the issue
elsewhere with gnupg 2.0.22. Apparently, only 2.1 versions are used.
IMHO, the initialization code for epg-gpg-program should check versions.
Best wishes
Jens
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#25947: 26.0.50; EasyPG does not honor customized epg-gpg-program
2017-03-11 14:05 ` Jens Lechtenboerger
@ 2017-03-12 1:27 ` Glenn Morris
0 siblings, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2017-03-12 1:27 UTC (permalink / raw)
To: Jens Lechtenboerger; +Cc: 25947, Daiki Ueno
Jens Lechtenboerger wrote:
> On March 10, 2017 8:26:38 PM CET, Glenn Morris <rgm@gnu.org> wrote:
>
>>What version of gpg2 do you have?
>
> I wont't have access to that machine before Monday, but I see the issue
> elsewhere with gnupg 2.0.22. Apparently, only 2.1 versions are used.
Yes, then it's working as intended if you have gpg2 < 2.1.6.
> IMHO, the initialization code for epg-gpg-program should check versions.
This area has been discussed before in eg https://debbugs.gnu.org/24229 .
I've applied the patch I posted earlier to handle the
customize-set-variable issue as cce29d942dc, and will close this report.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-03-12 1:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-03 11:34 bug#25947: 26.0.50; EasyPG does not honor customized epg-gpg-program Jens Lechtenboerger
2017-03-09 23:26 ` Glenn Morris
2017-03-10 15:09 ` Jens Lechtenboerger
2017-03-10 19:26 ` Glenn Morris
2017-03-11 14:05 ` Jens Lechtenboerger
2017-03-12 1:27 ` Glenn Morris
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.