Mailing List Archive

gpg-agent in scratchbox?
Hello,

when building my packages (navit), dpkg-buildpackage asks for my gpg
passphrase. Outstide of scratchbox this is handled through gpg-agent, but
inside scratchbox that does not seem to work.

Do all package builders enter manually their passphrases, or does sombody have
a working gpg-agent setup? If yes, can you please provide details?

Thanks,
Rainer

--
Rainer Dorsch
Lärchenstr. 6
D-72135 Dettenhausen
07157-734133
email: rdorsch@web.de
jabber: rdorsch@jabber.org
GPG Fingerprint: 5966 C54C 2B3C 42CC 1F4F 8F59 E3A8 C538 7519 141E
Full GPG key: http://pgp.mit.edu/
Re: gpg-agent in scratchbox? [ In reply to ]
Hi, Rainer,

At Sun, 2 Oct 2011 22:59:17 +0200,
Rainer Dorsch wrote:
> when building my packages (navit), dpkg-buildpackage asks for my gpg
> passphrase. Outstide of scratchbox this is handled through gpg-agent, but
> inside scratchbox that does not seem to work.
>
> Do all package builders enter manually their passphrases, or does sombody have
> a working gpg-agent setup? If yes, can you please provide details?

I don't use gpg-agent in scratchbox. Instead, I pass '-us -uc' to
dpkg-buildpackage to tell it not to sign the .dsc and .changes file.
For builds that I want to actually publish, I copy the .dsc and
.changes files over to the computer with my gpg key and use debsign to
generate the signatures.

HTH,

Neal
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: gpg-agent in scratchbox? [ In reply to ]
Hi,

2011/10/2 Rainer Dorsch <rdorsch@web.de>:
> when building my packages (navit), dpkg-buildpackage asks for my gpg
> passphrase. Outstide of scratchbox this is handled through gpg-agent, but
> inside scratchbox that does not seem to work.
>
> Do all package builders enter manually their passphrases, or does sombody have
> a working gpg-agent setup? If yes, can you please provide details?

As Neal said, for most packages it's okay to not sign them (-us -uc)
if you don't publish them. To get your "outer" instance of gpg-agent
registered/visible inside scratchbox, you have to make sure to pass
the environment variable $GPG_AGENT_INFO into the scratchbox
environment. The way you could accomplish this is to do something like
this in your "outer" .bashrc:

echo "GPG_AGENT_INFO=$GPG_AGENT_INFO"
>/scratchbox/users/yourusername/home/yourusername/.gpg_agent_info

Then, in your "inner" (inside Scratchbox) .bashrc, you can simply add:

source ~/.gpg_agent_info

After this (and opening a new terminal or entering "source .bashrc" in
your "outer" shell) you should get this variable set when you enter
scratchbox, and gpg should try to ask your GPG Agent for data. The
same works for ssh-agent as well (actually, I have only set it up for
ssh-agent, but given that they follow the same principle with
environment variables, I'm pretty sure that this approach works for
gpg-agent as well). If it doesn't work, echo $GPG_AGENT_INFO inside
scratchbox and make sure that it is set.

If you don't use bash, use .profile instead or refer to your shell's
manpage about environment variables there. Also, if you are on a
multi-user system, make sure that the file ".gpg_agent_info" is only
writable by your user, otherwise a malicious user could write shell
script code there that gets executed as your user whenever you open
Scratchbox.

HTH :)
Thomas
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers