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

'spawn gpg ENOENT' error when building with DMD (self-hosted runner, win 10 x64) #56

Open
ttldtor opened this issue May 16, 2022 · 4 comments

Comments

@ttldtor
Copy link

ttldtor commented May 16, 2022

An spawn gpg ENOENT error occurred while trying to build a project on a self-hosted runner with DMD (dmd-latest).
What could be the problem?

OS: Windows 10 x64, 21H2 19044.1706
CPU: AMD Ryzen 7 3700X
RAM: 32GB DDR4
Error:

Error: spawn gpg ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
    at onErrorNT (internal/child_process.js:470:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn gpg',
  path: 'gpg',
  spawnargs: [
    '--lock-never',
    '--verify',
    '--keyring',
    '/C/actions-runner\\_work\\_temp\\90014403-aad1-4779-8aa5-a2a1a6097825',
    '--no-default-keyring',
    '/C/actions-runner\\_work\\_temp\\6f60e58c-4002-44d8-b84b-c5d3fb578cf9',
    'C:\\actions-runner\\_work\\_temp\\43bfca81-d894-4484-a3c1-5dc93d16880c'
  ]
}

Project: https://github.com/ttldtor/diff
Logs: logs_9.zip

The path to gpg is in PATH. I can run it from terminal.
All other builds (and ldc on self-hosted logs_ldc.zip) were successful.
The user responsible for runner has enough rights to write to or read from the directory.

This is how a "successful" part of build under Windows (github runner) using DMD looks like:

 Enabling dmd-latest
Downloading http://downloads.dlang.org/releases/2.x/2.100.0/dmd.2.100.0.windows.7z
Verifying the download with GPG
gpg: Signature made Fri May 13 13:48:22 2022 CUT
gpg:                using EDDSA key 27637885C3CF8350732A1CA5723DC8887F97C07F
gpg: directory '/c/Users/runneradmin/.gnupg' created
gpg: /c/Users/runneradmin/.gnupg/trustdb.gpg: trustdb created
gpg: Good signature from "Martin Nowak <[email protected]>" [unknown]
gpg:                 aka "Martin Nowak <[email protected]>" [unknown]
gpg:                 aka "Martin Nowak <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: F8A2 6D5D 7572 ECA0 6EC7  9731 82C5 2E37 A8BC 8393
     Subkey fingerprint: 2763 7885 C3CF 8350 732A  1CA5 723D C888 7F97 C07F
Adding 'C:\hostedtoolcache\windows\dc\dmd-2.100.0\x64\dmd2\windows\bin' to path
Adding 'C:\hostedtoolcache\windows\dc\dmd-2.100.0\x64\dmd2\windows\bin64' to library path
Done

Please, help.

@ttldtor
Copy link
Author

ttldtor commented May 16, 2022

Perhaps the problem is in the generated paths for gpg tool...

@ttldtor
Copy link
Author

ttldtor commented May 16, 2022

I looked at the action source codes and saw that there is a path conversion for msys. Nowhere did I see this in the requirements for action. I am using gpg4win.

@WebFreak001
Copy link
Member

hm this action is using gpg assuming it is just installed.

Looks like in the preinstalled software list GPG is not included, so it's probably being used from msys here.

Don't think there is any better solution than installing it from msys for self hosted runners.

@ttldtor
Copy link
Author

ttldtor commented May 18, 2022

The fact is that I run runner as a service, so I will need to "do squats and push-ups" so that commands from under it are executed in msys. I have ideas how to do this without fixing the action. Perhaps I can fix this in the workflow. In the worst case, you just have to run runner from under msys.

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

No branches or pull requests

2 participants