Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3fc8b63

Browse files
Update nsjail to 3.1
1 parent a0024b4 commit 3fc8b63

File tree

6 files changed

+29
-11
lines changed

6 files changed

+29
-11
lines changed

‎Dockerfile.nsjail-3.0 renamed to ‎Dockerfile.nsjail-3.1

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
ARG MUSL_TARGET=x86_64-linux-musl
22
FROM libnl-3.2.25-${MUSL_TARGET} AS libnl
3-
FROM protobuf-3.19.1-${MUSL_TARGET} AS protobuf
3+
FROM protobuf-3.21.1-${MUSL_TARGET} AS protobuf
44
FROM musl-cross-make-${MUSL_TARGET}
55
ARG MUSL_TARGET
66

77
COPY --from=protobuf /output /output
88
COPY --from=libnl /output /output
99

1010
WORKDIR /build
11-
RUN download https://github.com/google/nsjail/archive/refs/tags/3.0.tar.gz source.tar.gz cfa66d3ed136b2e221752287b95e544915e8a6760aa866f023b604d14a374919 && tar xf source.tar.gz
11+
RUN download https://github.com/google/nsjail/archive/refs/tags/3.1.tar.gz source.tar.gz c944ce9b6dbfae7cc42b67ce720f997b3b12a2b41ba3462e133627a838f3ff3c && tar xf source.tar.gz
1212
RUN download https://github.com/google/kafel/archive/refs/tags/20200831.tar.gz kafel.tar.gz dc6a541e4699acb2ac76128142780604452694d747dfd31a809a90506f965d7e && tar xf kafel.tar.gz
13-
COPY patches/nsjail-3.0 /build/patches
13+
COPY patches/nsjail-3.1 /build/patches
1414
RUN patches/download_protoc.sh
1515
RUN export PATH=/build/cross/bin:$PATH:/output/bin && \
1616
mkdir -p /output/bin && \
1717
mkdir -p /output/include/sys && \
1818
echo "#!/bin/sh\nexit 0" > /output/bin/pkg-config && \
1919
chmod 0755 /output/bin/pkg-config && \
20-
cp /build/patches/queue.h /output/include/sys && \
2120
cp bin/protoc /output/bin && \
2221
cp -r kafel-*/* nsjail-*/kafel && \
2322
cd nsjail-* && \
23+
mkdir -p kafel/include/sys && \
24+
cp /build/patches/queue.h kafel/include/sys && \
25+
cp /build/patches/queue.h /output/include/sys && \
26+
cat /build/patches/clone_args.h >> subproc.h && \
2427
sed -e 's/-Werror//' -e 's/-pie//' -e 's/-fPIE//' -i Makefile && \
2528
sed -e 's/YYUSE/YY_USE/' -i kafel/src/parser.y && \
2629
sed -e 's/^TARGET=.*/TARGET=${STATIC_TARGET}/' -i kafel/src/Makefile && \

‎Dockerfile.protobuf-3.19.1 renamed to ‎Dockerfile.protobuf-3.21.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM musl-cross-make-$MUSL_TARGET
33
ARG MUSL_TARGET
44

55
WORKDIR /build
6-
RUN download https://github.com/protocolbuffers/protobuf/releases/download/v3.19.1/protobuf-cpp-3.19.1.tar.gz source.tar.gz 645192532f28254152b51c01868efdf9b766b1dbe49c77cccd6efcdb2d7c7bc2 && tar xf source.tar.gz
6+
RUN download https://github.com/protocolbuffers/protobuf/releases/download/v21.1/protobuf-cpp-3.21.1.tar.gz source.tar.gz 9ccabf07bd087bca3bb37067e04bf1d7377f0d60311cf3d2aa88e7af4c49a177 && tar xf source.tar.gz
77
RUN export PATH=/build/cross/bin:$PATH && \
88
cd protobuf-* && \
99
export CC="$MUSL_TARGET-gcc" && \

‎Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pcre-8.45: musl-cross-make
3131
libnl-3.2.25: musl-cross-make
3232
$(DOCKER_BUILD)
3333

34-
protobuf-3.19.1: musl-cross-make
34+
protobuf-3.21.1: musl-cross-make
3535
$(DOCKER_BUILD)
3636

3737
expat-2.4.1: musl-cross-make
@@ -120,7 +120,7 @@ ifdef GIT_FULL
120120
endif
121121

122122
# Currently this will only build on 64 bit ARM, 32 or 64 bit x86. This will be sorted out later.
123-
nsjail-3.0: libnl-3.2.25 protobuf-3.19.1
123+
nsjail-3.1: libnl-3.2.25 protobuf-3.21.1
124124
$(DOCKER_BUILD)
125-
$(GRABBY_HANDS) /build/nsjail-3.0/nsjail /grabby/$@
125+
$(GRABBY_HANDS) /build/nsjail-3.1/nsjail /grabby/$@
126126

‎patches/nsjail-3.1/clone_args.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* avoid needing to bring in the whole linux headers to get clone_args */
2+
3+
struct clone_args {
4+
__aligned_u64 flags;
5+
__aligned_u64 pidfd;
6+
__aligned_u64 child_tid;
7+
__aligned_u64 parent_tid;
8+
__aligned_u64 exit_signal;
9+
__aligned_u64 stack;
10+
__aligned_u64 stack_size;
11+
__aligned_u64 tls;
12+
__aligned_u64 set_tid;
13+
__aligned_u64 set_tid_size;
14+
__aligned_u64 cgroup;
15+
};

‎patches/nsjail-3.0/download_protoc.sh renamed to ‎patches/nsjail-3.1/download_protoc.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ cd /build || exit 1
66

77
case $(uname -m) in
88
aarch64)
9-
download https://github.com/protocolbuffers/protobuf/releases/download/v3.19.1/protoc-3.19.1-linux-aarch_64.zip protoc.zip 086e40c1658d241b2aefae659778637055b7c02e166fe2c835929a3066d41be3
9+
download https://github.com/protocolbuffers/protobuf/releases/download/v21.1/protoc-21.1-linux-aarch_64.zip protoc.zip b8add83f1908d417c1089167ee0e6d946d84600887ded4240e837b8b0c84202e
1010
;;
1111
x86_64)
12-
download https://github.com/protocolbuffers/protobuf/releases/download/v3.19.1/protoc-3.19.1-linux-x86_64.zip protoc.zip 4b18a69b3093432ee0531bc9bf3c4114f81bde1670ade2875f694180ac8bd7f6
12+
download https://github.com/protocolbuffers/protobuf/releases/download/v21.1/protoc-21.1-linux-x86_64.zip protoc.zip c9ac47cddd90d4c79bc55964ca9aec2f7fa06034f9bcc8215dd655b975ffd425
1313
;;
1414
i?86)
15-
download https://github.com/protocolbuffers/protobuf/releases/download/v3.19.1/protoc-3.19.1-linux-x86_32.zip protoc.zip ba9683d85db7d9f44965b38a5c0b05368d0e02ee21f24de3d29627f095d42de3
15+
download https://github.com/protocolbuffers/protobuf/releases/download/v21.1/protoc-21.1-linux-x86_32.zip protoc.zip 760982dee747cb9bd942ddf3501d81f4494c7581e90e48b79549c062a48c787e
1616
;;
1717
*)
1818
echo "Currently I don't know how to get protoc for your host architecture. Sorry. This is going to be sorted out at some point."
File renamed without changes.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /