duplicity complains about GPG_OPTS for status command
Brought to you by:
edso
It seems, some arguments don't play well with duplicity anymore.
When using
GPG_OPTS='--pinentry-mode=loopback --compress-algo=bzip2 --bzip2-compress-level=9'
in your conf file, but duplicity throws an error when running duply foo status now:
duplicity.cli_util.CommandLineError: Option '--pinentry-mode' is not a valid option for command 'collection-status'.
removing the first parameter gets you
CommandLineError: Option '--compress-algo' is not a valid option for command 'collection-status'.
This is running duply 2.5.1 and duplicity 2.2.2, both installed on FreeBSD as package.
Is this a duply or a duplicity issue?
The --pinentry-mode=loopback is a workaround for some GPG problem in GnuPG 2.1+, I don't know if it can be left out, both duply foo status and duply foo backup work without it, it seems.
this is the same duplicity issue as https://sourceforge.net/p/ftplicity/bugs/140/ which is according to the duplicity changelog fixed in v2.2.0
are you sure that you are running duplicity 2.2.2 ? can you post the complete output with versions and all?
feel free to post to the duplicity ticket wrt. the underlying issue https://gitlab.com/duplicity/duplicity/-/issues/795
2.2.2 man page says related to --pinentry-mode:
Does it make sense about using this option and error msg:
duplicity.cli_util.CommandLineError: Option '--pinentry-mode' is not a valid option for command 'collection-status'.no Nuno,
it's a bug in duplicity not accepting some
--name valuepairs separated by space anymore. the alternative--name=valuestill works. please read the ticket https://gitlab.com/duplicity/duplicity/-/issues/795what confuses me is that the error is supposed to be fixed in duplicity.
but furthermore, wrt. "--pinentry-mode" , this does indeed not need be set anymore as duplicity will do that automagically since some time. need to clean that from the conf template, will do :)
Last edit: ede 2024-03-01
running
duplywithbash -xshows that it generates the following command:According to https://gitlab.com/duplicity/duplicity/-/issues/795 the easy fix would be to use
--gpg-options='$GPG_OPTS'instead of--gpg-options '$GPG_OPTS'because it seems the error is still persistent.For reference, my versions:
I'll update the duplicity ticket, too.
you are totally right. but seeing it as a rarely used option ,
--pinentry-mode=loopbackis set by duplicity these days, i'll prefer to have upstream fix the issue properly.as a workaround you probably may comment
#GPG_OPTS=...and add the "working"--gpg-options='--compress-algo=bzip2 --bzip2-compress-level=9'to latest conf entryDUPL_PARAMS=...if i find time i might have a look at it at the duplicity issue but can't promise anything. life's keeping me busy just now.
Last edit: ede 2024-04-03
OK, the workaround does work, but requires me to set
GPG_TEST='disabled', because otherwise the calls togpgwont get the neccessaryGPG_OPTSset, it seems.Thanks for yourhelp!
i see. while duplicity internally sets
--pinentry-mode=loopbackduply for the tests does not. i wonder why i never stumbled over that.posted a WORKAROUND here https://sourceforge.net/p/ftplicity/bugs/140/#3138.
working on a fix.
can you guys please test if the new devel version fixes the issue for you?
https://duply.net/tmp/duply.sh
should be fixed in v2.5.3 . released now.
Thanks! I'll report back if things don't work as expected.