nixpkgs/pkgs/build-support
Joachim Fasting 75b9a7beac
grsecurity: implement a single NixOS kernel
This patch replaces the old grsecurity kernels with a single NixOS
specific grsecurity kernel.  This kernel is intended as a general
purpose kernel, tuned for casual desktop use.

Providing only a single kernel may seem like a regression compared to
offering a multitude of flavors.  It is impossible, however, to
effectively test and support that many options.  This is amplified by
the reality that very few seem to actually use grsecurity on NixOS,
meaning that bugs go unnoticed for long periods of time, simply because
those code paths end up never being exercised.  More generally, it is
hopeless to anticipate imagined needs.  It is better to start from a
solid foundation and possibly add more flavours on demand.

While the generic kernel is intended to cover a wide range of use cases,
it cannot cover everything.  For some, the configuration will be either
too restrictive or too lenient.  In those cases, the recommended
solution is to build a custom kernel --- this is *strongly* recommended
for security sensitive deployments.

Building a custom grsec kernel should be as simple as
```nix
linux_grsec_nixos.override {
  extraConfig = ''
    GRKERNSEC y
    PAX y
    # and so on ...
  '';
}
```

The generic kernel should be usable both as a KVM guest and host.  When
running as a host, the kernel assumes hardware virtualisation support.
Virtualisation systems other than KVM are *unsupported*: users of
non-KVM systems are better served by compiling a custom kernel.

Unlike previous Grsecurity kernels, this configuration disables `/proc`
restrictions in favor of `security.hideProcessInformation`.

Known incompatibilities:
- ZFS: can't load spl and zfs kernel modules; claims incompatibility
  with KERNEXEC method `or` and RAP; changing to `bts` does not fix the
  problem, which implies we'd have to disable RAP as well for ZFS to
  work
- `kexec()`: likely incompatible with KERNEXEC (unverified)
- Xen: likely incompatible with KERNEXEC and UDEREF (unverified)
- Virtualbox: likely incompatible with UDEREF (unverified)
2016-06-14 00:08:20 +02:00
..
agda agda: Remove unused/uneeded abstractions, including postprocess 2015-05-31 01:55:10 +00:00
build-dotnet-package build-dotnet-package: add optional makeWrapperArgs argument 2015-10-29 06:02:18 +03:00
build-fhs-chrootenv buildFHSEnv: use separate gcc for 64- and 32-bit 2016-05-29 23:22:58 +03:00
build-fhs-userenv buildFHSUserEnv: don't run bash in login mode for .env 2016-05-20 14:17:49 +03:00
buildenv buildEnv: fix #14682 evaluation in some edge cases 2016-04-17 08:57:17 +02:00
builder-defs Don't fail if env-vars cannot be written to 2015-11-04 16:32:59 +01:00
cc-wrapper cc-wrapper: add -B flag with cc.lib 2016-05-04 14:23:54 +02:00
docker no more goPackages 2016-06-09 13:08:00 +02:00
dotnetbuildhelpers Remove all-packages.nix helperFunctions dependency. 2016-03-20 16:41:20 +00:00
dotnetenv Remove executable bits from non-executable files 2015-01-27 18:54:38 +01:00
emacs emacs: hide wrapper dependencies 2016-05-12 22:43:30 +02:00
fetchadc Add Apple command-line tools 2014-10-02 06:50:09 +01:00
fetchbower bower2nix: 2.1.0 -> 3.0.1 2016-03-28 08:23:06 +01:00
fetchbzr nix-prefetch-bzr: match path name to fetchbzr name 2015-12-19 09:32:22 -06:00
fetchcvs build-support: Fix nix-prefetch-* on OS X. 2014-08-27 11:22:34 +02:00
fetchdarcs fetchbzr, fetchdarcs, fetchhg: use rev attr 2014-06-28 21:06:10 +02:00
fetchegg Infrastructure to build chicken eggs. 2014-10-13 23:29:27 +02:00
fetchfile Update builder.sh 2015-11-25 17:14:03 +08:00
fetchgit Merge pull request #15469 from NixOS/fetchgit 2016-05-16 16:44:55 +02:00
fetchgitlocal fetchgitlocal: be less chatty 2016-02-01 10:57:01 -08:00
fetchgitrevision Remove semicolon causing evaluation error. 2011-01-02 23:52:39 +00:00
fetchhg nix-prefetch-hg: Various bash style improvements, fixes #9511 2016-02-17 00:35:30 +01:00
fetchmtn Fix a few typos 2013-08-11 10:55:53 +00:00
fetchnuget fetchnuget: run fixupPhase to honor propagatedBuildInputs 2015-06-12 17:13:21 +02:00
fetchpatch fetchpatch: Allow to pass a postFetch attribute. 2015-06-23 03:35:30 +02:00
fetchsvn fetchsvn: correctly handle trailing slashes 2015-12-06 11:49:51 -06:00
fetchsvnrevision Live builds support: initially for git and svn. taglib_live is packaged as an example. 2011-01-02 23:23:59 +00:00
fetchsvnssh
fetchurl fetchurl mirrors: fix gnupg URLs 2016-05-17 11:35:49 +02:00
fetchzip fetchzip: improve error message 2016-05-17 17:32:53 +01:00
gcc-cross-wrapper orig-gcc -> orig-cc 2015-03-04 22:15:46 +01:00
gcc-wrapper-old gcc-wrapper-old: fix binutils and coreutils' paths 2016-04-25 14:27:51 +03:00
grsecurity grsecurity: implement a single NixOS kernel 2016-06-14 00:08:20 +02:00
icon-conv-tools icon-conv-tools: init at 0.0.0 (#13905) 2016-04-25 13:16:47 +02:00
kdewrapper Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
kernel makeModulesClosure: Small cleanup 2016-02-01 18:19:23 +01:00
libredirect citrix-receiver: init at 13.2.1, fixes #8458 2015-11-11 22:27:15 +01:00
make-desktopitem chromium: add StartupWMClass to desktop file. Fixes #12433 2016-02-29 20:42:58 +01:00
make-startupitem Another attempt to eradicate ensureDir 2014-06-30 14:56:10 +02:00
make-symlinks
mono-dll-fixer
nuke-references nuke-references: support -e option 2015-10-18 18:41:11 +03:00
ocaml Ensure that we can evaluate the platform attribute of ocaml packages. 2016-03-13 19:08:26 +00:00
release debian-build: fix checkinstall invocation (#15538) 2016-05-19 09:41:10 +01:00
rust Fix buildRustPackage edge cases 2016-06-02 17:15:52 +02:00
setup-hooks setup-hooks: do not pass missing dirs to find (close #15405) 2016-05-22 12:08:01 +02:00
src-only
substitute doc/stdenv.xml document substitution env variables 2016-04-23 21:41:35 +02:00
substitute-files substituteAllFiles: support postInstall 2016-01-10 06:03:26 +03:00
templaterpm Update: new features for nix-template-rpm 2015-02-06 20:12:57 +01:00
upstream-updater update-walker: add a minimal description 2016-01-01 19:07:38 +01:00
vm add CentOS 7.1 2016-05-24 11:35:39 +01:00
vsenv * "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless 2012-01-18 20:16:00 +00:00
build-maven.nix build-maven: use lib.importJSON 2016-02-29 13:49:29 +00:00
build-pecl.nix fix phpPackages memcache,memcached,xdebug 2015-02-05 20:28:16 +01:00
replace-dependency.nix nix: Add a "dev" output 2016-04-18 21:13:18 +02:00
source-from-head-fun.nix Remove getConfig helper function 2012-09-19 13:56:56 -04:00
trivial-builders.nix symlinkJoin: allow arbitrary additional attributes 2016-05-27 13:42:22 +03:00