nsjail: unbreak for armv*

This commit is contained in:
Matthias von Faber 2019-12-09 17:20:22 +01:00 committed by Helmut Pozimski
parent d2483f1a61
commit 9b2bd41118
3 changed files with 45 additions and 21 deletions

View file

@ -0,0 +1,44 @@
From 9f064737de83ee0fa39bac5c6671a8251fec437e Mon Sep 17 00:00:00 2001
From: Robert Swiecki <robert@swiecki.net>
Date: Thu, 12 Sep 2019 22:21:49 +0200
Subject: [PATCH] user: better formatting directives for printf'like functions
---
user.cc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git user.cc user.cc
index d2342aa..e7050dc 100644
--- user.cc
+++ user.cc
@@ -257,22 +257,22 @@ bool initNsFromChild(nsjconf_t* nsjconf) {
groupsString += "]";
if (!setResGid(nsjconf->gids[0].inside_id)) {
- PLOG_E("setresgid(%u)", nsjconf->gids[0].inside_id);
+ PLOG_E("setresgid(%lu)", (unsigned long)nsjconf->gids[0].inside_id);
return false;
}
- LOG_D("setgroups(%lu, %s)", groups.size(), groupsString.c_str());
+ LOG_D("setgroups(%zu, %s)", 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(%zu, %s) failed", groups.size(), groupsString.c_str());
return false;
}
- PLOG_D("setgroups(%lu, %s) failed", groups.size(), groupsString.c_str());
+ PLOG_D("setgroups(%zu, %s) failed", groups.size(), groupsString.c_str());
}
if (!setResUid(nsjconf->uids[0].inside_id)) {
- PLOG_E("setresuid(%u)", nsjconf->uids[0].inside_id);
+ PLOG_E("setresuid(%lu)", (unsigned long)nsjconf->uids[0].inside_id);
return false;
}
--
2.24.0

View file

@ -1,14 +0,0 @@
--- mnt.cc 2018-04-18 14:11:19.000000000 +0200
+++ mnt.cc 2018-04-21 13:07:43.814692651 +0200
@@ -47,6 +47,11 @@
#include "subproc.h"
#include "util.h"
+#if !defined(ST_RELATIME)
+/* In musl libc this is not (yet?) defined */
+#define ST_RELATIME 4096
+#endif
+
namespace mnt {
#if !defined(MS_LAZYTIME)

View file

@ -1,7 +1,7 @@
# Template file for 'nsjail'
pkgname=nsjail
version=2.9
revision=1
revision=2
build_style=gnu-makefile
hostmakedepends="bison flex pkg-config protobuf"
makedepends="libnl3-devel protobuf-devel"
@ -15,11 +15,6 @@ checksum="f8578a48330d3d089c9234a2b562be08043f8fe77453c322724acdf403d0afc3
49d2327c794c90aca50a9933c00d453705534b16e5f42d8c8e19c3d274f5e5f8"
archs="aarch64* armv5tel* armv6l* armv7l* x86_64*"
CXXFLAGS="-Wno-format-truncation"
case "$XBPS_TARGET_MACHINE" in
armv*) broken="https://build.voidlinux.org/builders/armv6l_builder/builds/20655/steps/shell_3/logs/stdio";;
esac
post_extract() {
rmdir kafel
@ -33,5 +28,4 @@ pre_build() {
do_install() {
vbin ${pkgname}
vman nsjail.1
vlicense LICENSE
}