[elbe-devel] [PATCH] init: specify GNUPGHOME for gpg --import

Thomas Weißschuh thomas.weissschuh at linutronix.de
Fri Feb 2 10:02:14 CET 2024


The default configuration may interfere with the import process.

For example when "use-keyboxd" is specified in common.conf the
`--keyring` argument is completely ignored.
Instead the keys from keyboxd would be imported.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/commands/init.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/elbepack/commands/init.py b/elbepack/commands/init.py
index d613390e..d62946f9 100644
--- a/elbepack/commands/init.py
+++ b/elbepack/commands/init.py
@@ -227,14 +227,12 @@ def run_command(argv):
 
         export_keyring = import_keyring + ".gpg"
 
-        # No need to set GNUPGHOME because both input and output
-        # keyring files are specified.
-
         do(f'gpg --no-options \
                 --no-default-keyring \
                 --keyring {import_keyring} \
                 --export \
-                --output {export_keyring}')
+                --output {export_keyring}',
+            env_add={'GNUPGHOME': out_path})
 
         if opt.devel:
             out_real = os.path.realpath(out_path)
-- 
2.43.0



More information about the elbe-devel mailing list