[pkg-gnupg-maint] Bug#850656: Bug#850656: gnupg-agent: Please allow config to specify fast RNG
Werner Koch
wk at gnupg.org
Mon Jan 9 08:10:48 UTC 2017
On Sun, 8 Jan 2017 23:32, ijackson at chiark.greenend.org.uk said:
> dgit test suite. But I have to jump through hoops to do so: I end up
> putting a stunt gpg program on the PATH so that I can pass
> --agent-program.
Obviously we had the same problem in the test suite and thus we
implemented an ugly hack to pass additional options via the
--agent-program option:
else if ((s=strchr (agent_program, '|')) && s[1] == '-' && s[2]=='-')
{
/* Hack to insert an additional option on the command line. */
program = xtrystrdup (agent_program);
if (!program)
{
gpg_error_t tmperr = gpg_err_make (errsource,
gpg_err_code_from_syserror ());
xfree (sockname);
assuan_release (ctx);
return tmperr;
}
p = strchr (program, '|');
*p++ = 0;
program_arg = p;
}
We use use it like this in the test suite:
(define (create-gpghome)
(log "Creating test environment...")
(srandom (getpid))
(make-test-data "random_seed" 600)
(log "Creating configuration files")
(for-each
(lambda (name)
(file-copy (in-srcdir (string-append name ".tmpl")) name)
(let ((p (open-input-output-file name)))
(cond
((string=? "gpg.conf" name)
(if have-opt-always-trust
(display "no-auto-check-trustdb\n" p))
(display (string-append "agent-program "
(tool 'gpg-agent)
"|--debug-quick-random\n") p)
(display "allow-weak-digest-algos\n" p))
((string=? "gpg-agent.conf" name)
(display (string-append "pinentry-program " PINENTRY "\n") p)))))
'("gpg.conf" "gpg-agent.conf")))
I would suggest to have a close look at the test suite to see how to do
certain things. For example we recently introduced a --build-prefix
option to gpgconf to setup a different build directory to replace other
hacks to use the binaries from the build directory:
(define gpg-components (apply gpg-conf
`(,@(if installed? '()
(list '--build-prefix (getenv "objdir")))
--list-components)))
For help with using gnupg I would kindly suggest to mail to gnupg-devel
and not to open a bug for each question.
Shalom-Salam,
Werner
--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnupg-maint/attachments/20170109/7fad50e1/attachment.sig>
More information about the pkg-gnupg-maint
mailing list