Page MenuHome GnuPG

gpgtar: Error when using --status-fd
Closed, ResolvedPublic

Description

Using gpgtar via GpgME which uses a pipe with special FDs for status messages fails with

gpg: Fatal: status-fd is invalid: Bad file descriptor
gpgtar: running /opt/gnupg/master/bin/gpg failed (exitcode=2): General error
gpgtar: creating tarball '-' failed: General error

GpgME calls gpgtar with the following command line:

gpgtar --batch --gpg-args --lc-messages=de_DE.UTF-8 --gpg-args --lc-ctype=de_DE.UTF-8 --status-fd 4 --gpg-args --no-tty --gpg-args --charset=utf8 --gpg-args --enable-progress-filter --gpg-args --exit-on-status-write-error --gpg-args --display=:0 --gpg-args --ttyname=/dev/pts/33 --gpg-args --ttytype=xterm-256color --symmetric --gpg-args --armor --output - --files-from - --null --utf8-strings

If I omit the --status-fd 4 option, then it works. But, obviously, GpgME won't be able to handle any status messages.

Priority is high because this blocks the high priority task T6342: GPGME/Kleopatra: Extend gpgme to use gpgtar.

Event Timeline

ikloecker created this task.
werner changed the task status from Open to Testing.Jan 18 2023, 10:45 AM
werner moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

This can be easily tested using

gpgtar --status-fd 4  -er SOMEUSERID . >/dev/null 4>&2

No test done on Windows but the mechanism is pretty generic.

werner moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jan 19 2023, 4:21 PM
ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.

Works now for gpgme. Thanks!