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

rspamd: add hyperscan, drop obsoleted dependencies #49915

Merged
merged 7 commits into from Dec 3, 2018
Merged

Conversation

avnik
Copy link
Contributor

@avnik avnik commented Nov 8, 2018

Motivation for this change

Add hyperscan support on x86_64 (and package hyperscan as well)
Drop obsoleted gmime dependency
Add options to enable fann/gd/openblas

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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

@Mic92
Copy link
Member

Mic92 commented Nov 8, 2018

@GrahamcOfBorg build rspamd

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: rspamd

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: rspamd

Partial log (click to expand)

shrinking /nix/store/24z497389g4m5g7k0dd9842kwnym4zql-rspamd-1.8.1/lib/rspamd/librspamd-actrie.so
shrinking /nix/store/24z497389g4m5g7k0dd9842kwnym4zql-rspamd-1.8.1/bin/rspamadm
shrinking /nix/store/24z497389g4m5g7k0dd9842kwnym4zql-rspamd-1.8.1/bin/rspamc
shrinking /nix/store/24z497389g4m5g7k0dd9842kwnym4zql-rspamd-1.8.1/bin/rspamd
gzipping man pages under /nix/store/24z497389g4m5g7k0dd9842kwnym4zql-rspamd-1.8.1/share/man/
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/24z497389g4m5g7k0dd9842kwnym4zql-rspamd-1.8.1/lib  /nix/store/24z497389g4m5g7k0dd9842kwnym4zql-rspamd-1.8.1/bin
patching script interpreter paths in /nix/store/24z497389g4m5g7k0dd9842kwnym4zql-rspamd-1.8.1
/nix/store/24z497389g4m5g7k0dd9842kwnym4zql-rspamd-1.8.1/bin/rspamd_stats: interpreter directive changed from "/usr/bin/env perl" to "/nix/store/bzgcpj9fijmlxgjaa72fjys7m3ycijy8-perl-5.28.0/bin/perl"
checking for references to /build in /nix/store/24z497389g4m5g7k0dd9842kwnym4zql-rspamd-1.8.1...

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-linux (full log)

Attempted: rspamd

Partial log (click to expand)

[ 55%] Building C object CMakeFiles/hs_exec_corei7.dir/src/nfa/limex_64.c.o
[ 55%] Building C object CMakeFiles/hs_exec_corei7.dir/src/nfa/limex_simd128.c.o
[ 55%] Building C object CMakeFiles/hs_exec_corei7.dir/src/nfa/limex_simd256.c.o
[ 55%] Building C object CMakeFiles/hs_exec_corei7.dir/src/nfa/limex_simd384.c.o
[ 55%] Building C object CMakeFiles/hs_exec_corei7.dir/src/nfa/limex_simd512.c.o
[ 56%] Building C object CMakeFiles/hs_exec_corei7.dir/src/nfa/mcclellan.c.o
[ 56%] Building C object CMakeFiles/hs_exec_corei7.dir/src/nfa/mcsheng.c.o
building of '/nix/store/5x8m26fj9z8vsrhk6rf0170x8an0pgvc-hyperscan-5.0.0.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/zcms8z88jmh5hiavbdhsnsbjkamb3ll5-rspamd-1.8.1.drv': 1 dependencies couldn't be built
error: build of '/nix/store/zcms8z88jmh5hiavbdhsnsbjkamb3ll5-rspamd-1.8.1.drv' failed

@avnik
Copy link
Contributor Author

avnik commented Nov 8, 2018

@Mic92 hyperscan build timed out. Probably we can set it off by default -- is useful optimization on high volumes, but can take hours to build (although it depends on cmake and boost only, and shouldn't rebuild often)

@avnik
Copy link
Contributor Author

avnik commented Nov 8, 2018

@GrahamcOfBorg build rspamd

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 23, 2018

What's the rationale to build rspamd with jemalloc? It does not seem to be the upstream default.

(also: v1.8.2 is out)

@avnik
Copy link
Contributor Author

avnik commented Nov 23, 2018

@c0bw3b build with jemalloc is author suggestion. Source package have very conservative defaults, to reduce build dependencies. Author himself build deb/rpm/freebsd packages with jemalloc (and hyperscan on x86_64). Hyperscan looks good on runtime, but take ~1.5 hours to build, so I move it to option.

other suggestions taken in acocunt, will update PR today later or tomorrow

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 23, 2018

Ok for building with jemalloc. Thanks for explaining.
The hyperscan build time is less of an issue. Once built it will be cached.
(I'm also building it locally to check).

Copy link
Member

@andir andir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few nits that are mostly about style not functionality. But mostly looks fine 👍

, boost
}:

assert stdenv.isx86_64;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this not be moved towards a platform restriction in the meta attribute?

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 23, 2018

No problem for building hyperscan on x64-linux

Result in /[...]/nox-review-_kylyhod
total 0
lrwxrwxrwx 1 zzzz users 56 23 nov.  21:23 result -> /nix/store/yn5rqbk5spf3s52khk76szjbk2b81134-rspamd-1.8.1
lrwxrwxrwx 1 zzzz users 59 23 nov.  21:23 result-2 -> /nix/store/d4m0im5a8dnh6gb2cqr6vlpnn59slnnm-hyperscan-5.0.0

@avnik
Copy link
Contributor Author

avnik commented Nov 24, 2018

Added 1.8.2 upgrade, and included all clarifications, except some I have mentioned above.

@Mic92 @fpletz I'd like your opinion, about nessesary to build hyperscan by default

@@ -3349,6 +3349,8 @@ with pkgs;

hylafaxplus = callPackage ../servers/hylafaxplus { };

hyperscan = callPackage ../development/libraries/hyperscan { };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be better located between hyena and icu58 in the ### DEVELOPMENT / LIBRARIES section.
(nitpick)

@c0bw3b
Copy link
Contributor

c0bw3b commented Dec 2, 2018

Probably going to timeout on x64-linux but I'd like to check aarch64 build so
@GrahamcOfBorg build rspamd

@avnik
Copy link
Contributor Author

avnik commented Dec 2, 2018 via email

@c0bw3b
Copy link
Contributor

c0bw3b commented Dec 2, 2018

@GrahamcOfBorg build rspamd

Copy link
Contributor

@c0bw3b c0bw3b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebuilt locally on NixOS

Result in /[...]/nox-review-3hgirszu
total 0
lrwxrwxrwx 1 zzzz users 56  3 déc.  01:41 result -> /nix/store/xgmfcngzaqf7wv8hzpr5wg3fhp8j2csp-rspamd-1.8.2
lrwxrwxrwx 1 zzzz users 59  3 déc.  01:41 result-2 -> /nix/store/9bnflfbbkylhyg8s3vww5mw1fwjkllky-hyperscan-5.0.0

@c0bw3b c0bw3b merged commit 550b275 into NixOS:master Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants