libmodsecurity: remove dependency on valgrind#173558
Merged
SuperSandro2000 merged 1 commit intoNixOS:masterfrom May 19, 2022
Merged
libmodsecurity: remove dependency on valgrind#173558SuperSandro2000 merged 1 commit intoNixOS:masterfrom
SuperSandro2000 merged 1 commit intoNixOS:masterfrom
Conversation
valgrind is only supported on certain platforms (it notably lacks support for armv6l), so needs to be excluded as a dependency on unsupported platforms. In this case, it turns out that valgrind is not currently used at all, so I removed it entirely. libmodsecurity can optionally use valgrind to run tests, but we don't run the tests at all.
Mindavi
approved these changes
May 19, 2022
Contributor
|
Maybe this variant is better? diff --git a/pkgs/tools/security/libmodsecurity/default.nix b/pkgs/tools/security/libmodsecurity/default.nix
index 4ba294e42f2..c22dc9f5321 100644
--- a/pkgs/tools/security/libmodsecurity/default.nix
+++ b/pkgs/tools/security/libmodsecurity/default.nix
@@ -1,7 +1,8 @@
{ lib, stdenv, fetchFromGitHub
, autoreconfHook, bison, flex, pkg-config
, curl, geoip, libmaxminddb, libxml2, lmdb, lua, pcre
-, ssdeep, valgrind, yajl
+, ssdeep, yajl
+, withValgrind ? false, valgrind
, nixosTests
}:
@@ -18,7 +19,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ autoreconfHook bison flex pkg-config ];
- buildInputs = [ curl geoip libmaxminddb libxml2 lmdb lua pcre ssdeep valgrind yajl ];
+ buildInputs = [ curl geoip libmaxminddb libxml2 lmdb lua pcre ssdeep yajl ] ++ lib.optional withValgrind valgrind;
outputs = [ "out" "dev" ];
|
Contributor
Author
|
Why? Valgrind is not currently used as far as I can tell. It certainly doesn't end up in the output closure. If we ever wanted to run the tests, then it might make sense to do |
Contributor
|
I assumed that libmodsecurity uses valgrind for some specific operations. Or I'm wrong? |
Member
|
valgrind is used for testing which we are not doing (but we should) and debugging which usually requires additional tools we don't install by default. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
valgrind is only supported on certain platforms (it notably lacks support for armv6l), so needs to be excluded as a dependency on unsupported platforms. In this case, it turns out that valgrind is not currently used at all, so I removed it entirely. libmodsecurity can optionally use valgrind to run tests, but we don't run the tests at all.
Note that I don't actually use libmodsecurity, but tengine depends on it and is evaluated as part of the nginx NixOS module even if it is not used: #147027 (comment)
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes