Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b3f42ae53c57
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5a3fdf27d3f1
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Jun 25, 2018

  1. libgcrypt: keep new lock behavior but only do so around collector access

    Not around a function that itself will grab the rng lock.
    
    Unfortunate that we obtain/release the lock twice
    but this seems least invasive way to fix this.
    
    (cherry picked from commit 7cfdb89)
    dtzWill committed Jun 25, 2018
    Copy the full SHA
    94e261d View commit details
  2. libgcrypt: mention PR, upstream issue

    (cherry picked from commit 6c16f3d)
    dtzWill committed Jun 25, 2018
    Copy the full SHA
    57c0968 View commit details
  3. libgcrypt: don't disable checks on Darwin, let's see if patch fixes

    (cherry picked from commit d6bffa6)
    ("yes the patch does fix tests on Darwin", by the way :))
    dtzWill committed Jun 25, 2018
    Copy the full SHA
    5a3fdf2 View commit details
Showing with 33 additions and 2 deletions.
  1. +4 −2 pkgs/development/libraries/libgcrypt/default.nix
  2. +29 −0 pkgs/development/libraries/libgcrypt/fix-jent-locking.patch
6 changes: 4 additions & 2 deletions pkgs/development/libraries/libgcrypt/default.nix
Original file line number Diff line number Diff line change
@@ -23,6 +23,9 @@ stdenv.mkDerivation rec {

depsBuildBuild = stdenv.lib.optional stdenv.isCross buildPackages.stdenv.cc;

# Accepted upstream, should be in next update: #42150, https://dev.gnupg.org/T4034
patches = [ ./fix-jent-locking.patch ];

buildInputs = [ libgpgerror ]
++ stdenv.lib.optional stdenv.isDarwin gettext
++ stdenv.lib.optional enableCapabilities libcap;
@@ -49,8 +52,7 @@ stdenv.mkDerivation rec {
cp src/.libs/libgcrypt.20.dylib $out/lib
'';

# TODO: reenable with next update?
doCheck = !stdenv.isDarwin;
doCheck = true;

meta = with stdenv.lib; {
homepage = https://www.gnu.org/software/libgcrypt/;
29 changes: 29 additions & 0 deletions pkgs/development/libraries/libgcrypt/fix-jent-locking.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From bbe989be6ca5e093d5244413590bd80e12c2ec9b Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
Date: Sun, 17 Jun 2018 18:53:58 -0500
Subject: [PATCH] rndjent: move locking to fix trying to obtain held lock,
hanging

---
random/rndjent.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/random/rndjent.c b/random/rndjent.c
index 0c5a820b..3740ddd4 100644
--- a/random/rndjent.c
+++ b/random/rndjent.c
@@ -334,9 +334,10 @@ _gcry_rndjent_get_version (int *r_active)
{
if (r_active)
{
- lock_rng ();
/* Make sure the RNG is initialized. */
_gcry_rndjent_poll (NULL, 0, 0);
+
+ lock_rng ();
/* To ease debugging we store 2 for a clock_gettime based
* implementation and 1 for a rdtsc based code. */
*r_active = jent_rng_collector? is_rng_available () : 0;
--
2.18.0-rc2