nsjail: rebuild against protobuf-23.3_1
This commit is contained in:
parent
45b582e71f
commit
ef1e5e8190
6 changed files with 63 additions and 36 deletions
10
srcpkgs/nsjail/patches/32bitint.patch
Normal file
10
srcpkgs/nsjail/patches/32bitint.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- a/macros.h 2022-11-22 22:25:15.000000000 +0100
|
||||||
|
+++ - 2023-07-14 21:21:14.506361610 +0200
|
||||||
|
@@ -65,6 +65,6 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define NS_VALSTR_STRUCT(x) \
|
||||||
|
- { (uint64_t) x, #x }
|
||||||
|
+ { (long unsigned int) x, #x }
|
||||||
|
|
||||||
|
#endif /* NS_COMMON_H */
|
11
srcpkgs/nsjail/patches/cpp17.patch
Normal file
11
srcpkgs/nsjail/patches/cpp17.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/Makefile 2022-11-22 22:25:15.000000000 +0100
|
||||||
|
+++ - 2023-07-08 16:35:16.308351723 +0200
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
-Ikafel/include
|
||||||
|
|
||||||
|
CXXFLAGS += $(USER_DEFINES) $(COMMON_FLAGS) $(shell pkg-config --cflags protobuf) \
|
||||||
|
- -std=c++14 -fno-exceptions -Wno-unused -Wno-unused-parameter
|
||||||
|
+ -std=c++17 -fno-exceptions -Wno-unused -Wno-unused-parameter
|
||||||
|
LDFLAGS += -pie -Wl,-z,noexecstack -lpthread $(shell pkg-config --libs protobuf)
|
||||||
|
|
||||||
|
BIN = nsjail
|
|
@ -1,30 +0,0 @@
|
||||||
From 32768d3cc8cecbc30d9020dbfa8d9ec541d057e4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Evangelos Foutras <evangelos@foutrelis.com>
|
|
||||||
Date: Wed, 17 Mar 2021 16:36:40 +0200
|
|
||||||
Subject: [PATCH] Replace YYUSE call with void cast in src/parser.y
|
|
||||||
|
|
||||||
The YYUSE macro was renamed to YY_USE in bison 3.7.5; we might as well
|
|
||||||
avoid using it altogether and cast the unused variable to void instead.
|
|
||||||
|
|
||||||
Fixes the following linker error:
|
|
||||||
|
|
||||||
/usr/bin/ld: kafel/libkafel.a(libkafel.o): in function `kafel_yyerror':
|
|
||||||
arm_syscalls.c:(.text+0x6984): undefined reference to `YYUSE'
|
|
||||||
---
|
|
||||||
src/parser.y | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git kafel/src/parser.y kafel/src/parser.y
|
|
||||||
index e0f109c..0e01373 100644
|
|
||||||
--- a/kafel/src/parser.y
|
|
||||||
+++ b/kafel/src/parser.y
|
|
||||||
@@ -420,8 +420,8 @@ const_def
|
|
||||||
|
|
||||||
void yyerror(YYLTYPE * loc, struct kafel_ctxt* ctxt, yyscan_t scanner,
|
|
||||||
const char *msg) {
|
|
||||||
+ (void)scanner; /* suppress unused-parameter warning */
|
|
||||||
if (!ctxt->lexical_error) {
|
|
||||||
- YYUSE(scanner);
|
|
||||||
if (loc->filename != NULL) {
|
|
||||||
append_error(ctxt, "%s:%d:%d: %s", loc->filename, loc->first_line, loc->first_column, msg);
|
|
||||||
} else {
|
|
11
srcpkgs/nsjail/patches/ldflags.patch
Normal file
11
srcpkgs/nsjail/patches/ldflags.patch
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
--- a/kafel/src/Makefile 2023-07-08 16:40:45.058218240 +0200
|
||||||
|
+++ - 2023-07-08 16:54:04.459715051 +0200
|
||||||
|
@@ -56,7 +56,7 @@
|
||||||
|
$(CC) $(CFLAGS) -Wl,-soname,$@.${VERSION} -shared $^ -o $@
|
||||||
|
|
||||||
|
${STATIC_TARGET}: ${OBJECTS}
|
||||||
|
- $(LD) $(LDFLAGS) -r ${OBJECTS} -o libkafel_r.o
|
||||||
|
+ $(LD) -r ${OBJECTS} -o libkafel_r.o
|
||||||
|
# Fix x86 PIC symbols
|
||||||
|
$(OBJDUMP) -t libkafel_r.o | grep '.hidden' | grep -v 'get_pc_thunk' | sed -e 's/^.*\.hidden //' > libkafel.localize_symbols
|
||||||
|
$(OBJCOPY) -w --localize-symbols=libkafel.localize_symbols libkafel_r.o libkafel.o
|
24
srcpkgs/nsjail/patches/log.patch
Normal file
24
srcpkgs/nsjail/patches/log.patch
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
diff --git a/config.cc b/config.cc
|
||||||
|
index 5242ba4..bbb2b6d 100644
|
||||||
|
--- a/config.cc
|
||||||
|
+++ b/config.cc
|
||||||
|
@@ -302,11 +302,6 @@ static bool configParseInternal(nsjconf_t* nsjconf, const nsjail::NsJailConfig&
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void LogHandler(
|
||||||
|
- google::protobuf::LogLevel level, const char* filename, int line, const std::string& message) {
|
||||||
|
- LOG_W("config.cc: '%s'", message.c_str());
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
bool parseFile(nsjconf_t* nsjconf, const char* file) {
|
||||||
|
LOG_D("Parsing configuration from '%s'", file);
|
||||||
|
|
||||||
|
@@ -316,7 +311,6 @@ bool parseFile(nsjconf_t* nsjconf, const char* file) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
- SetLogHandler(LogHandler);
|
||||||
|
google::protobuf::io::FileInputStream input(fd);
|
||||||
|
input.SetCloseOnDelete(true);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'nsjail'
|
# Template file for 'nsjail'
|
||||||
pkgname=nsjail
|
pkgname=nsjail
|
||||||
version=3.0
|
version=3.3
|
||||||
revision=9
|
revision=1
|
||||||
create_wrksrc=yes
|
create_wrksrc=yes
|
||||||
build_style=gnu-makefile
|
build_style=gnu-makefile
|
||||||
hostmakedepends="bison flex pkg-config protobuf which"
|
hostmakedepends="bison flex pkg-config protobuf which"
|
||||||
|
@ -11,9 +11,9 @@ maintainer="Orphaned <orphan@voidlinux.org>"
|
||||||
license="Apache-2.0"
|
license="Apache-2.0"
|
||||||
homepage="http://nsjail.com"
|
homepage="http://nsjail.com"
|
||||||
distfiles="https://github.com/google/nsjail/archive/${version}.tar.gz
|
distfiles="https://github.com/google/nsjail/archive/${version}.tar.gz
|
||||||
https://github.com/google/kafel/archive/8e69b8efae415cde3debffbb1e379d9e7a16835a.tar.gz"
|
https://github.com/google/kafel/archive/1af0975af45ca4404f357b9a4e1636f53a01bfd3.tar.gz"
|
||||||
checksum="cfa66d3ed136b2e221752287b95e544915e8a6760aa866f023b604d14a374919
|
checksum="9c247d0cba565b4e3f91cc76e827ddf7f3ad499f54ba611edd25d4d7be4890c3
|
||||||
4a6c9a1a70ed99bbed767adc106081b017a3090307ea88cc7e329b82daa1373b"
|
e8c195a2a08daa70c7712adae3eaa01656b039dcc8cc1e5e8210006716761ad5"
|
||||||
|
|
||||||
archs="aarch64* armv5tel* armv6l* armv7l* x86_64*"
|
archs="aarch64* armv5tel* armv6l* armv7l* x86_64*"
|
||||||
|
|
||||||
|
@ -28,7 +28,8 @@ post_extract() {
|
||||||
}
|
}
|
||||||
|
|
||||||
post_patch() {
|
post_patch() {
|
||||||
sed -i -e 's/-Werror\b//g' -e 's/\b\(\(C\(XX\)\?\|LD\)FLAGS\s*+=\)/override \1/g' Makefile kafel/build/Makefile.mk kafel/src/Makefile
|
vsed -e 's/-Werror\b//g' -i Makefile kafel/build/Makefile.mk
|
||||||
|
vsed -e 's/\b\(\(C\(XX\)\?\|LD\)FLAGS\s*+=\)/override \1/g' -i Makefile kafel/build/Makefile.mk kafel/src/Makefile
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue