-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Static build with musl and alpline linux headers.
- Loading branch information
1 parent
96f108f
commit 565a73b
Showing
12 changed files
with
116 additions
and
111 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "cijail" | ||
version = "0.6.3" | ||
version = "0.6.4" | ||
edition = "2021" | ||
publish = false | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/sh | ||
|
||
cleanup() { | ||
rm -rf "$workdir" | ||
} | ||
|
||
build_libseccomp() { | ||
git clone \ | ||
--depth=1 \ | ||
--branch v$libseccomp_version \ | ||
https://github.com/seccomp/libseccomp \ | ||
"$workdir"/libseccomp | ||
cd "$workdir"/libseccomp | ||
# https://git.alpinelinux.org/aports/tree/main/libseccomp?id=bdeb5ac39445d803f7d97bb9b3cf9171d9a35f52 | ||
sed -i '/\#include <sys\/prctl.h>/d' src/system.c | ||
grep prctl src/system.c || true | ||
autoreconf -vif | ||
./configure \ | ||
--prefix=/opt/libseccomp \ | ||
--disable-shared \ | ||
--enable-static \ | ||
CC=musl-gcc \ | ||
LD=musl-gcc \ | ||
CPPFLAGS=-I/usr/include/alpine | ||
make -j"$(nproc)" | ||
make install | ||
} | ||
|
||
build_openssl() { | ||
git clone \ | ||
--depth=1 \ | ||
--branch openssl-$openssl_version \ | ||
https://github.com/openssl/openssl \ | ||
"$workdir"/openssl | ||
cd "$workdir"/openssl | ||
openssl_dir=/usr/local/cijail/ssl | ||
./Configure \ | ||
--prefix=/opt/openssl \ | ||
--openssldir="$openssl_dir" \ | ||
-static | ||
make -j"$(nproc)" | ||
make install_sw install_ssldirs | ||
cp /etc/ssl/certs/ca-certificates.crt "$openssl_dir"/certs/ | ||
} | ||
|
||
libseccomp_version=2.5.5 | ||
openssl_version=3.3.0 | ||
set -ex | ||
trap cleanup EXIT | ||
workdir="$(mktemp -d)" | ||
build_libseccomp | ||
build_openssl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.