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

gpgme: disable tests on darwin #60193

Closed
wants to merge 1 commit into from

Conversation

marsam
Copy link
Contributor

@marsam marsam commented Apr 25, 2019

Motivation for this change

gpgme tests times out on darwin https://hydra.nixos.org/build/92440044/

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Apr 25, 2019
@ofborg ofborg bot requested review from Fuuzetsu and primeos April 25, 2019 01:47
@primeos
Copy link
Member

primeos commented Apr 25, 2019

As a long-term solution this doesn't look like a good idea to me but I don't mind merging it as a quick fix for the meantime :)

Looking at the end of the log it seems to fail due to pinentry:

COMPONENT
=========
  Name: pinentry
  Desc: Passphrase Entry
  Path: /nix/store/p3nkk485h969d94aqqrp4q5ni08rf7x5-pinentry-mac-0.9.4/Applications/pinentry-mac.app/Contents/MacOS/pinentry-mac
[...]
building of [...] timed out after 7200 seconds of silence

I'm assuming that the pinentry version vor Mac waits for some user input instead of running non-interactively for this test.

cc @matthewbauer (as the maintainer of pinentry-mac) - could you have a quick look at this?

@matthewbauer
Copy link
Member

Yeah these tests usually assume we aren’t headless. This should override it but i’m not sure if it works:

https://github.com/GPGTools/pinentry-mac/blob/master/Source/main.m#L71

@marsam
Copy link
Contributor Author

marsam commented Apr 26, 2019

I tried with:

  preCheck = lib.optionalString stdenv.isDarwin ''
    export PINENTRY_USER_DATA="USE_CURSES=1"
  '';

but unfortunately still times out

@LnL7
Copy link
Member

LnL7 commented Apr 26, 2019

I noticed a while back that setting GPG_TTY stopped working on darwin, maybe this is related.

@svend
Copy link
Contributor

svend commented Apr 26, 2019

I get filename too long errors in the tests when installing this locally.

GNUPGHOME=/private/var/folders/8k/bl8cjsgx2hn19vwkwg467s0j29fd1k/T/nix-build-gpgme-1.13.0.drv-0/gpgme-1.13.0/tests/gpg LC_ALL=C GPG_AGENT_INFO= top_srcdir=../.. gpg --batch --no-permission-warning \
               --import ./pubdemo.asc
gpg: keybox '/private/var/folders/8k/bl8cjsgx2hn19vwkwg467s0j29fd1k/T/nix-build-gpgme-1.13.0.drv-0/gpgme-1.13.0/tests/gpg/pubring.kbx' created
gpg: /private/var/folders/8k/bl8cjsgx2hn19vwkwg467s0j29fd1k/T/nix-build-gpgme-1.13.0.drv-0/gpgme-1.13.0/tests/gpg/trustdb.gpg: trustdb created
gpg: key 2D727CC768697734: public key "Alfa Test (demo key) <alfa@example.net>" imported
gpg: can't connect to the agent: File name too long

There is a limit to the length of GNUPGHOME. Here is a relevant bug report in Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847206

@LnL7
Copy link
Member

LnL7 commented Apr 26, 2019

The length of paths for unix sockets is also limited to 104 characters, this can sometimes cause problems for tests since the default $TMPDIR on darwin has a pretty long prefix.

@zimbatm
Copy link
Member

zimbatm commented May 1, 2019

this seems to be fixed after fd2bd6e

@marsam marsam closed this May 1, 2019
@marsam marsam deleted the disable-check-gpgme-darwin branch May 1, 2019 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants