From d23d22c3cdef295cf6cbdd56c718f8c0aa1b19a2 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 17 Mar 2017 13:53:29 +0100 Subject: [PATCH] nsjail: update to 1.3. --- srcpkgs/nsjail/patches/musl-rlim64_t.patch | 3 ++- srcpkgs/nsjail/template | 30 ++++++++++++---------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/srcpkgs/nsjail/patches/musl-rlim64_t.patch b/srcpkgs/nsjail/patches/musl-rlim64_t.patch index 62a39a106d4..b32fab9a20a 100644 --- a/srcpkgs/nsjail/patches/musl-rlim64_t.patch +++ b/srcpkgs/nsjail/patches/musl-rlim64_t.patch @@ -1,9 +1,10 @@ --- common.h 2016-09-10 03:20:32.000000000 +0200 +++ common.h 2017-01-04 17:24:12.807104061 +0100 -@@ -100,13 +100,13 @@ +@@ -100,14 +100,14 @@ bool verbose; bool keep_env; bool keep_caps; + bool disable_no_new_privs; - __rlim64_t rl_as; - __rlim64_t rl_core; - __rlim64_t rl_cpu; diff --git a/srcpkgs/nsjail/template b/srcpkgs/nsjail/template index 145a169d4d3..bb1719efeae 100644 --- a/srcpkgs/nsjail/template +++ b/srcpkgs/nsjail/template @@ -1,27 +1,29 @@ # Template file for 'nsjail' pkgname=nsjail -version=1.2 -revision=2 +version=1.3 +revision=1 build_style=gnu-makefile +hostmakedepends="libnl3-devel" +makedepends="${hostmakedepends}" short_desc="A light-weight process isolation tool" maintainer="Andrea Brancaleoni " license="Apache-2.0" -homepage="https://github.com/google/$pkgname" -distfiles="$homepage/archive/$version.tar.gz" -checksum="9f262d56a189cf26f5c66b2c022364df979da92042f64c04300fdbb88aaba8ab" +homepage="https://github.com/google/nsjail" +distfiles="${homepage}/archive/${version}.tar.gz" +checksum=8df57499c3512362283fb1663f37bfa687a64654a377800dfa6ea94486bf119c CFLAGS="-Wno-error=format" -do_build() { - case "$XBPS_TARGET_MACHINE" in - *-musl) cp ${FILESDIR}/musl-compat.h . - sed -i common.h -e '/#include /a #include "musl-compat.h"' - ;; - esac - make CC=$CC +post_extract() { + sed -i '/^CC/d' Makefile + sed -i 's/\(C\|LD\)FLAGS +=/override &/' Makefile +} +pre_build() { + case "$XBPS_TARGET_MACHINE" in + *-musl) CFLAGS+=" -include ${FILESDIR}/musl-compat.h" ;; + esac } - do_install() { - vbin $pkgname + vbin ${pkgname} vlicense LICENSE }