gradm: 3.1-201507191652 -> 3.1-201607172312
This commit is contained in:
parent
0cbea742ab
commit
e4b7b7b028
@ -1,52 +1,49 @@
|
|||||||
{ fetchurl, stdenv, bison, flex, pam,
|
{ stdenv, fetchurl
|
||||||
gcc, coreutils, findutils, binutils, bash }:
|
, bison, flex
|
||||||
|
, pam
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "gradm-${version}";
|
name = "gradm-${version}";
|
||||||
version = "3.1-201507191652";
|
version = "3.1-201607172312";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://grsecurity.net/stable/${name}.tar.gz";
|
url = "http://grsecurity.net/stable/${name}.tar.gz";
|
||||||
sha256 = "0l3s56wvk5kpd2qppl328x4alh327xnbf271lh1fan84pxbw651g";
|
sha256 = "1r3fbrfijj8mbh3gl489q5bj2srj35f9f96i04nfmw427qpcg0a2";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ gcc coreutils findutils binutils pam flex bison bash ];
|
nativeBuildInputs = [ bison flex ];
|
||||||
preBuild = ''
|
buildInputs = [ pam ];
|
||||||
substituteInPlace ./Makefile --replace "/usr/include/security/pam_" "${pam}/include/security/pam_"
|
|
||||||
substituteInPlace ./gradm_defs.h --replace "/sbin/grlearn" "$out/sbin/grlearn"
|
|
||||||
substituteInPlace ./gradm_defs.h --replace "/sbin/gradm" "$out/sbin/gradm"
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
mkdir -p $out/lib/udev/rules.d
|
|
||||||
cat > $out/lib/udev/rules.d/80-grsec.rules <<EOF
|
|
||||||
ACTION!="add|change", GOTO="permissions_end"
|
|
||||||
KERNEL=="grsec", MODE="0622"
|
|
||||||
LABEL="permissions_end"
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "inherit-learn /nix/store" >> $out/etc/grsec/learn_config
|
|
||||||
'';
|
|
||||||
|
|
||||||
makeFlags =
|
|
||||||
[ "DESTDIR=$(out)"
|
|
||||||
"CC=${gcc}/bin/gcc"
|
|
||||||
"FLEX=${flex}/bin/flex"
|
|
||||||
"BISON=${bison}/bin/bison"
|
|
||||||
"FIND=${findutils}/bin/find"
|
|
||||||
"STRIP=${binutils.out}/bin/strip"
|
|
||||||
"INSTALL=${coreutils}/bin/install"
|
|
||||||
"MANDIR=/share/man"
|
|
||||||
"MKNOD=true"
|
|
||||||
];
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"DESTDIR=$(out)"
|
||||||
|
"LEX=${flex}/bin/flex"
|
||||||
|
"MANDIR=/share/man"
|
||||||
|
"MKNOD=true"
|
||||||
|
];
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
substituteInPlace Makefile \
|
||||||
|
--replace "/usr/bin/" "" \
|
||||||
|
--replace "/usr/include/security/pam_" "${pam}/include/security/pam_"
|
||||||
|
|
||||||
|
substituteInPlace gradm_defs.h \
|
||||||
|
--replace "/sbin/grlearn" "$out/bin/grlearn" \
|
||||||
|
--replace "/sbin/gradm" "$out/bin/gradm" \
|
||||||
|
--replace "/sbin/gradm_pam" "$out/bin/gradm_pam"
|
||||||
|
|
||||||
|
echo 'inherit-learn /nix/store' >>learn_config
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''rmdir $out/dev'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "grsecurity RBAC administration and policy analysis utility";
|
description = "grsecurity RBAC administration and policy analysis utility";
|
||||||
homepage = "https://grsecurity.net";
|
homepage = "https://grsecurity.net";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ thoughtpolice ];
|
maintainers = with maintainers; [ thoughtpolice joachifm ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -10848,9 +10848,7 @@ in
|
|||||||
|
|
||||||
gpm-ncurses = self.gpm.override { inherit ncurses; };
|
gpm-ncurses = self.gpm.override { inherit ncurses; };
|
||||||
|
|
||||||
gradm = callPackage ../os-specific/linux/gradm {
|
gradm = callPackage ../os-specific/linux/gradm { };
|
||||||
flex = flex_2_5_35;
|
|
||||||
};
|
|
||||||
|
|
||||||
hdparm = callPackage ../os-specific/linux/hdparm { };
|
hdparm = callPackage ../os-specific/linux/hdparm { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user