running gpg-agent in foreground

Falko Strenzke falko.strenzke at mtg.de
Thu Jan 18 07:24:22 CET 2024


Thanks, the first approach seems to work fine for me.

- Falko

Am 17.01.24 um 17:56 schrieb Werner Koch:
> On Wed, 17 Jan 2024 14:01, Falko Strenzke said:
>> I would like to run my development version of GPG-agent under valgrind. As I
>> understand it, for that purpose I have to run it in the foreground, i.e. in
>> server mode. However, whenever I launch it as
> No, that will not work for you.  I recommend this:
>
>    cd /my/test/directory
>    GNUPGHOME=`pwd` gpg-agent --daemon /bin/sh
>
> This way you can easily start gpg-agent via valgrind.  Instead of
> running a shell directly you may also use a script instead of /bin/sh:
>
> --8<---------------cut here---------------start------------->8---
> #!/bin/sh
>
> SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
> export SSH_AUTH_SOCK
> cat >setup-tests.ini <<'EOF'
> PS1="$(echo "$PS1" | sed 's,\\\$ $,(GnuPGTest)\\\$ ,')"
> export HISTCONTROL=ignoreboth
> export HISTFILE=$(pwd)/.bash_history
> EOF
> exec bash --init-file setup-tests.ini
> --8<---------------cut here---------------end--------------->8---
>
> which gives you a dedicated prompt so that you can easily see that you
> are in a test environment.
>
> For logging put "log-file socket://" into common.conf and
> run
>
>    watchgnupg --time-only --homedir /my/test/directory
>
> in another terminal.  Add --force to take over the logging socket.
> Useful debug options for gpg-agent.conf are "debug ipc".  Use
> "gpg-agent --debug help" to get a list of all debug options.
>
>
> Salam-Shalom,
>
>     Werner
>
-- 

*MTG AG*
Dr. Falko Strenzke
Executive System Architect

Phone: +49 6151 8000 24
E-Mail: falko.strenzke at mtg.de
Web: mtg.de <https://www.mtg.de>

MTG AG - Dolivostr. 11 - 64293 Darmstadt, Germany
Commercial register: HRB 8901
Register Court: Amtsgericht Darmstadt
Management Board: Jürgen Ruf (CEO), Tamer Kemeröz
Chairman of the Supervisory Board: Dr. Thomas Milde

This email may contain confidential and/or privileged information. If 
you are not the correct recipient or have received this email in error,
please inform the sender immediately and delete this email.Unauthorised 
copying or distribution of this email is not permitted.

Data protection information: Privacy policy 
<https://www.mtg.de/en/privacy-policy>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20240118/27526d5a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xD1AC7C9C72A60A61.asc
Type: application/pgp-keys
Size: 3139 bytes
Desc: OpenPGP public key
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20240118/27526d5a/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20240118/27526d5a/attachment.sig>


More information about the Gnupg-users mailing list