mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
added community/nsjail
This commit is contained in:
parent
4200b1eb7b
commit
463dba0148
2 changed files with 70 additions and 0 deletions
34
community/nsjail/0001-32-bit-fix.patch
Normal file
34
community/nsjail/0001-32-bit-fix.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
From cef9e11371857a16fda242c179da1d8c5350486a Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sat, 7 Sep 2019 08:29:10 -0600
|
||||
Subject: [PATCH] 32-bit fix
|
||||
|
||||
---
|
||||
user.cc | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/user.cc b/user.cc
|
||||
index d2342aa..95e026e 100644
|
||||
--- a/user.cc
|
||||
+++ b/user.cc
|
||||
@@ -261,14 +261,14 @@ bool initNsFromChild(nsjconf_t* nsjconf) {
|
||||
return false;
|
||||
}
|
||||
|
||||
- LOG_D("setgroups(%lu, %s)", groups.size(), groupsString.c_str());
|
||||
+ LOG_D("setgroups(%lu, %s)", (unsigned long)groups.size(), groupsString.c_str());
|
||||
if (setgroups(groups.size(), groups.data()) == -1) {
|
||||
/* Indicate error if specific groups were requested */
|
||||
if (groups.size() > 0) {
|
||||
- PLOG_E("setgroups(%lu, %s) failed", groups.size(), groupsString.c_str());
|
||||
+ PLOG_E("setgroups(%lu, %s) failed", (unsigned long)groups.size(), groupsString.c_str());
|
||||
return false;
|
||||
}
|
||||
- PLOG_D("setgroups(%lu, %s) failed", groups.size(), groupsString.c_str());
|
||||
+ PLOG_D("setgroups(%lu, %s) failed", (unsigned long)groups.size(), groupsString.c_str());
|
||||
}
|
||||
|
||||
if (!setResUid(nsjconf->uids[0].inside_id)) {
|
||||
--
|
||||
2.23.0
|
||||
|
36
community/nsjail/PKGBUILD
Normal file
36
community/nsjail/PKGBUILD
Normal file
|
@ -0,0 +1,36 @@
|
|||
# Maintainer: Bruno Pagani <archange@archlinux.org>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - patch to fix 32-bit builds
|
||||
|
||||
pkgname=nsjail
|
||||
pkgver=2.9
|
||||
pkgrel=1
|
||||
pkgdesc="Light-weight process isolation tool"
|
||||
arch=(x86_64)
|
||||
url="https://nsjail.com"
|
||||
license=(Apache)
|
||||
depends=(protobuf libnl)
|
||||
makedepends=(git)
|
||||
source=("https://github.com/google/nsjail/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
|
||||
'git+https://github.com/google/kafel.git#commit=722b93a630e53ca472a4c69f61cb3dfc44ea5041'
|
||||
'0001-32-bit-fix.patch')
|
||||
sha256sums=('f8578a48330d3d089c9234a2b562be08043f8fe77453c322724acdf403d0afc3'
|
||||
'SKIP'
|
||||
'3187c9980a1c0a91ac3e0302bf8fdbf87126c6e29679aa4c36322790efed4db2')
|
||||
|
||||
prepare() {
|
||||
mv kafel ${pkgname}-${pkgver}
|
||||
cd ${pkgname}-${pkgver}
|
||||
patch -p1 -i ../0001-32-bit-fix.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd ${pkgname}-${pkgver}
|
||||
install -Dm755 nsjail -t "${pkgdir}"/usr/bin/
|
||||
}
|
Loading…
Reference in a new issue