Merge pull request #93709 from arcz/update-nsjail

nsjail: 2.9 -> 3.0
This commit is contained in:
Ryan Mulligan 2020-07-28 11:28:25 -07:00 committed by GitHub
commit fb140c7d36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 9 deletions

View File

@ -673,6 +673,12 @@
githubId = 3965744; githubId = 3965744;
name = "Arthur Lee"; name = "Arthur Lee";
}; };
arturcygan = {
email = "arczicygan@gmail.com";
github = "arcz";
githubId = 4679721;
name = "Artur Cygan";
};
artuuge = { artuuge = {
email = "artuuge@gmail.com"; email = "artuuge@gmail.com";
github = "artuuge"; github = "artuuge";

View File

@ -4,26 +4,24 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "nsjail"; pname = "nsjail";
version = "2.9"; version = "3.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "google"; owner = "google";
repo = "nsjail"; repo = "nsjail";
rev = version; rev = version;
fetchSubmodules = true; fetchSubmodules = true;
sha256 = "0218n0qjb45fawqqfj3gdxgd0fw5k0vxn9iggi0ciljmr9zywkgh"; sha256 = "1w6x8xcrs0i1y3q41gyq8z3cq9x24qablklc4jiydf855lhqn4dh";
}; };
postPatch = ''
substituteInPlace user.cc \
--replace "/usr/bin/newgidmap" "${shadow}/bin/newgidmap" \
--replace "/usr/bin/newuidmap" "${shadow}/bin/newuidmap"
'';
nativeBuildInputs = [ autoconf bison flex libtool pkgconfig which ]; nativeBuildInputs = [ autoconf bison flex libtool pkgconfig which ];
buildInputs = [ libnl protobuf protobufc ]; buildInputs = [ libnl protobuf protobufc ];
enableParallelBuilding = true; enableParallelBuilding = true;
preBuild = ''
makeFlagsArray+=(USER_DEFINES='-DNEWUIDMAP_PATH=${shadow}/bin/newuidmap -DNEWGIDMAP_PATH=${shadow}/bin/newgidmap')
'';
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/share/man/man1 mkdir -p $out/bin $out/share/man/man1
install nsjail $out/bin/ install nsjail $out/bin/
@ -34,7 +32,7 @@ stdenv.mkDerivation rec {
description = "A light-weight process isolation tool, making use of Linux namespaces and seccomp-bpf syscall filters"; description = "A light-weight process isolation tool, making use of Linux namespaces and seccomp-bpf syscall filters";
homepage = "http://nsjail.com/"; homepage = "http://nsjail.com/";
license = licenses.asl20; license = licenses.asl20;
maintainers = with maintainers; [ bosu c0bw3b ]; maintainers = with maintainers; [ arturcygan bosu c0bw3b ];
platforms = platforms.linux; platforms = platforms.linux;
}; };
} }