Skip to content

spack gpg trust fails on RHEL7: "--create-socketdir": invalid option #20585

@eugeneswalker

Description

@eugeneswalker

spack gpg trust is now returning non-zero exit status on RHEL7 even when the spack command itself is being properly used.

Spack info:

  • spack@develop (8919226)
  • Mon Dec 28 17:56:15 2020 +0100):

I'm using the following Docker images, which are based on the official RHEL 7 UBI image (registry.access.redhat.com/ubi7/ubi:7.6-239)

  • ecpe4s/rhel7-runner-x86_64:2020-12-01
  • ecpe4s/rhel7-runner-ppc64le:2020-12-01

GPG version info:

$> gpg --version
gpg (GnuPG) 2.0.22
libgcrypt 1.5.3
...

Here's the problem as it presents itself:

$> spack --version
0.16.0-389-8919226
$> spack gpg trust e4s.pub
gpgconf: invalid option "--create-socketdir"
==> Error: None: No such file or directory: 'None'
Command: 'None' '--create-socketdir'
$> spack -d gpg trust e4s.pub
==> [2020-12-28-17:57:13.255469] Imported gpg from built-in commands
==> [2020-12-28-17:57:13.257931] Imported gpg from built-in commands
==> [2020-12-28-17:57:13.258679] '/usr/bin/gpgconf' '--version'
==> [2020-12-28-17:57:13.260456] '/usr/bin/gpgconf' '--dry-run' '--create-socketdir'
gpgconf: invalid option "--create-socketdir"
==> [2020-12-28-17:57:13.262194] '/usr/bin/gpg2' '--version'
==> [2020-12-28-17:57:13.264410] 'None' '--create-socketdir'
==> [2020-12-28-17:57:13.265610] ProcessError: None: No such file or directory: 'None'
    Command: 'None' '--create-socketdir'
==> [2020-12-28-17:57:13.265703] Error: None: No such file or directory: 'None'
Command: 'None' '--create-socketdir'
Traceback (most recent call last):
  File "/opt/spack/lib/spack/spack/util/executable.py", line 170, in __call__
    env=env)
  File "/usr/local/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/local/lib/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'None': 'None'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/spack/lib/spack/spack/main.py", line 762, in main
    return _invoke_command(command, parser, args, unknown)
  File "/opt/spack/lib/spack/spack/main.py", line 490, in _invoke_command
    return_val = command(parser, args)
  File "/opt/spack/lib/spack/spack/cmd/gpg.py", line 201, in gpg
    args.func(args)
  File "/opt/spack/lib/spack/spack/cmd/gpg.py", line 159, in gpg_trust
    spack.util.gpg.trust(args.keyfile)
  File "/opt/spack/lib/spack/spack/util/gpg.py", line 410, in trust
    return get_global_gpg_instance().trust(*args, **kwargs)
  File "/opt/spack/lib/spack/spack/util/gpg.py", line 345, in trust
    self('--import', keyfile)
  File "/opt/spack/lib/spack/spack/util/gpg.py", line 307, in __call__
    if self.prep:
  File "/opt/spack/lib/spack/llnl/util/lang.py", line 197, in _memoized_function
    func.cache[args] = func(*args)
  File "/opt/spack/lib/spack/spack/util/gpg.py", line 290, in prep
    self.gpgconf_exe('--create-socketdir')
  File "/opt/spack/lib/spack/spack/util/executable.py", line 204, in __call__
    '%s: %s' % (self.exe[0], e.strerror), 'Command: ' + cmd_line)
spack.util.executable.ProcessError: None: No such file or directory: 'None'
    Command: 'None' '--create-socketdir'

The commit that introduced the issue is:

  • 857749a
  • Tue Dec 22 21:39:10 2020 -0800

I'm not seeing this problem on RHEL8, Ubuntu 18.04 or Ubuntu 20.04.

@opadron @shahzebsiddiqui @scottwittenburg @trws

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinge4secppipelinesIssues related to spack's pipeline featurestriageThe issue needs to be prioritized

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions