Change GNUPG home directory variable

In newer versions of gnupg, it uses `homedir` instead of `gnupghome`
When using gnupghome in the simplelogin.env I get this error when running the docker command to prepare the database by running the migration:

...... other errors above
  File "/code/app/dashboard/views/mailbox_detail.py", line 20, in <module>
    from app.pgp_utils import PGPException, load_public_key_and_check
  File "/code/app/pgp_utils.py", line 14, in <module>
    gpg = gnupg.GPG(gnupghome=GNUPGHOME)
  File "/usr/local/lib/python3.7/site-packages/gnupg.py", line 827, in __init__
    raise ValueError('gnupghome should be a directory (it isn\'t): %s' % gnupghome)
ValueError: gnupghome should be a directory (it isn't): /sl/pgp

Changing my simplelogin.env to use homedir instead, made this process work. Hope this helps.
This commit is contained in:
Josh Wenke 2023-04-03 13:39:11 -04:00 committed by GitHub
parent 1f9d784382
commit 215bfe1daf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -411,7 +411,7 @@ DB_URI=postgresql://myuser:mypassword@sl-db:5432/simplelogin
FLASK_SECRET=put_something_secret_here
GNUPGHOME=/sl/pgp
HOMEDIR=/sl/pgp
LOCAL_FILE_UPLOAD=1