Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change GNUPG home directory variable #1679

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joshwenke
Copy link

@joshwenke joshwenke commented Apr 3, 2023

In newer versions of gnupg, it uses homedir instead of gnupghome > https://pythonhosted.org/gnupg/gnupg.html

When using gnupghome in the simplelogin.env I get this error when running the docker command to prepare the database by running the migration (and /sl/pgp is definitely a directory)

...... 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.

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.
@nguyenkims
Copy link
Contributor

@joshwenke thanks but as we pin the version of gpg as you can see on

app/poetry.lock

Line 2668 in c09b5bc

name = "python-gnupg"
, changes in newer version shouldn't affect SL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants