summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorJosef Kemetmüller <josef.kemetmueller@gmail.com>2021-05-14 18:36:36 +0200
committerJosef Kemetmüller <josef.kemetmueller@gmail.com>2021-05-15 08:21:30 +0200
commit05c517698dcf6a989e364863cf5e7f6f548dd50a (patch)
tree77503e8656457885c2bdbc7fc561c9abf1b8d7da /pkgs/os-specific
parentf7b49ea2af1342ea3ff0d32e9048c17ac122bceb (diff)
downloadnixpkgs-05c517698dcf6a989e364863cf5e7f6f548dd50a.tar
nixpkgs-05c517698dcf6a989e364863cf5e7f6f548dd50a.tar.gz
nixpkgs-05c517698dcf6a989e364863cf5e7f6f548dd50a.tar.bz2
nixpkgs-05c517698dcf6a989e364863cf5e7f6f548dd50a.tar.lz
nixpkgs-05c517698dcf6a989e364863cf5e7f6f548dd50a.tar.xz
nixpkgs-05c517698dcf6a989e364863cf5e7f6f548dd50a.tar.zst
nixpkgs-05c517698dcf6a989e364863cf5e7f6f548dd50a.zip
bluez: Disable kernel dependent test-mesh-crypto
I'm having trouble building bluez on a CentOS 7.9 builder.
Turns out that the test-mesh-crypto test depends on the following Linux
kernel configuration items:
CONFIG_CRYPTO_[USER|USER_API|USER_API_AEAD|USER_API_HASH|AES|CCM|AEAD|CMAC]
and will fail if run wih an incompatible kernel with the following error
message:

    ...
    IVindex              = 12345678
    NetworkNonce         = 00800000011201000012345678
                           00800000011201000012345678 => PASS
    PrivacyRandom        = 000000000012345678b5e5bfdacbaf6c
                           000000000012345678fffd034b50057e => FAIL
    FAIL unit/test-mesh-crypto (exit status: 1)

I found the same bug reported on Gentoo https://bugs.gentoo.org/704190.
Their fix is to only run the test if the kernel options are available,
which we don't want to do for build reproducibility.
Instead we just want to skip the test unconditionally. As it's simpler
to completely override the test instead of patching the build system, we
opt for doing just that.
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/bluez/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/bluez/default.nix b/pkgs/os-specific/linux/bluez/default.nix
index 2e342fbc039..96b9e5937b3 100644
--- a/pkgs/os-specific/linux/bluez/default.nix
+++ b/pkgs/os-specific/linux/bluez/default.nix
@@ -48,6 +48,11 @@ in stdenv.mkDerivation rec {
     substituteInPlace tools/hid2hci.rules \
       --replace /sbin/udevadm ${systemd}/bin/udevadm \
       --replace "hid2hci " "$out/lib/udev/hid2hci "
+    # Disable some tests:
+    # - test-mesh-crypto depends on the following kernel settings:
+    #   CONFIG_CRYPTO_[USER|USER_API|USER_API_AEAD|USER_API_HASH|AES|CCM|AEAD|CMAC]
+    if [[ ! -f unit/test-mesh-crypto.c ]]; then echo "unit/test-mesh-crypto.c no longer exists"; false; fi
+    echo 'int main() { return 77; }' > unit/test-mesh-crypto.c
   '';
 
   configureFlags = [