nsjail: update to 1.5.

disable musl for now.
This commit is contained in:
Andrea Brancaleoni 2017-07-09 11:28:47 +02:00
parent 505873d283
commit e945b727dc
4 changed files with 13 additions and 78 deletions

View file

@ -1,11 +0,0 @@
#if !defined(MUSL_COMPAT_H)
#define MUSL_COMPAT_H
# define TEMP_FAILURE_RETRY(expression) \
(__extension__ \
({ long int __result; \
do __result = (long int) (expression); \
while (__result == -1L && errno == EINTR); \
__result; }))
#endif /* !defined(MUSL_COMPAT_H) */

View file

@ -1,55 +0,0 @@
--- common.h 2016-09-10 03:20:32.000000000 +0200
+++ common.h 2017-01-04 17:24:12.807104061 +0100
@@ -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;
- __rlim64_t rl_fsize;
- __rlim64_t rl_nofile;
- __rlim64_t rl_nproc;
- __rlim64_t rl_stack;
+ rlim64_t rl_as;
+ rlim64_t rl_core;
+ rlim64_t rl_cpu;
+ rlim64_t rl_fsize;
+ rlim64_t rl_nofile;
+ rlim64_t rl_nproc;
+ rlim64_t rl_stack;
unsigned long personality;
bool clone_newnet;
bool clone_newuser;
--- cmdline.h 2016-09-10 03:20:32.000000000 +0200
+++ cmdline.h 2017-01-04 17:25:32.479110539 +0100
@@ -27,7 +27,7 @@
#include "common.h"
-__rlim64_t cmdlineParseRLimit(int res, const char *optarg, unsigned long mul);
+rlim64_t cmdlineParseRLimit(int res, const char *optarg, unsigned long mul);
void cmdlineLogParams(struct nsjconf_t *nsjconf);
bool cmdlineParse(int argc, char *argv[], struct nsjconf_t *nsjconf);
--- cmdline.c 2016-09-10 03:20:32.000000000 +0200
+++ cmdline.c 2017-01-04 17:26:19.346114418 +0100
@@ -137,7 +137,7 @@
return true;
}
-__rlim64_t cmdlineParseRLimit(int res, const char *optarg, unsigned long mul)
+rlim64_t cmdlineParseRLimit(int res, const char *optarg, unsigned long mul)
{
struct rlimit64 cur;
if (prlimit64(0, res, NULL, &cur) == -1) {
@@ -153,7 +153,7 @@
LOG_F("RLIMIT %d needs a numeric or 'max'/'def' value ('%s' provided)", res,
optarg);
}
- __rlim64_t val = strtoull(optarg, NULL, 0) * mul;
+ rlim64_t val = strtoull(optarg, NULL, 0) * mul;
if (val == ULLONG_MAX && errno != 0) {
PLOG_F("strtoul('%s', 0)", optarg);
}

View file

@ -1,27 +1,26 @@
# Template file for 'nsjail'
pkgname=nsjail
version=1.3
version=1.5
revision=1
build_style=gnu-makefile
hostmakedepends="libnl3-devel"
makedepends="${hostmakedepends}"
hostmakedepends="libnl3-devel git pkg-config protobuf-c bison flex"
makedepends="libnl3-devel libcap-devel"
short_desc="A light-weight process isolation tool"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="Apache-2.0"
homepage="https://github.com/google/nsjail"
distfiles="${homepage}/archive/${version}.tar.gz"
checksum=8df57499c3512362283fb1663f37bfa687a64654a377800dfa6ea94486bf119c
only_for_archs="aarch64 armv6l armv7l i686 x86_64"
CFLAGS="-Wno-error=format"
post_extract() {
sed -i '/^CC/d' Makefile
sed -i 's/\(C\|LD\)FLAGS +=/override &/' Makefile
do_fetch() {
git clone $homepage $wrksrc
cd $wrksrc
git checkout $version
}
pre_build() {
case "$XBPS_TARGET_MACHINE" in
*-musl) CFLAGS+=" -include ${FILESDIR}/musl-compat.h" ;;
esac
do_build() {
make CC=$CC
}
do_install() {
vbin ${pkgname}

2
srcpkgs/nsjail/update Normal file
View file

@ -0,0 +1,2 @@
site=https://api.github.com/repos/google/nsjail/tags
pattern='"name":\s*"\K[^\d]*([\d\.]+)(?=")'