Page MenuHome GnuPG

gpgtar needs to support a few more general command line args to be usable by gpgme
Closed, ResolvedPublic

Description

In "archive" mode, gpgme's gpg engine calls gpgtar (instead of gpg) with the following general options most of which probably need to be supported natively by gpgtar instead of being forwarded via --gpg-args to gpg:

--homedir
--no-tty
--charset
--display
--ttyname
--ttytype
--logger-fd

I'm not sure about

--enable-progress-filter
--exit-on-status-write-error

which are also set by the engine's gpg_new. Those options could probably be set later in build_argv when we already know that we want to call gpgtar instead of gpg.

Event Timeline

ikloecker created this task.

no-tty and charset are anyway obsolete and passed only for older gpg versions. The other things should have useful defaults in gpg - in particular these defaults are taken from the same envvar as gpgme does. See send_pinentry_environment.

Okay, I'll skip those for now.

What about --enable-special-filenames and the fact that data is passed to gpg via a special FD? The idea was to pass the filenames the same way to gpgtar.

Using stdin would be much simpler. I'll see how I can convince gpgme to write the filenames to stdin instead of to the special data FD.

What about --logger-fd? Does gpgtar pass all FDs through to gpg?

ikloecker claimed this task.

Instead of using --enable-special-filenames and a separate FD the list of files is now passed to gpgtar's stdin. Similarly, we read from gpgtar's stderr instead of using a separate --logger-fd.

Any other options that gpgtar doesn't support are passed to gpg with --gpg-args.

ebo moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Apr 12 2023, 2:52 PM