Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io compartments to compression libraries #2333

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions lib/libbz2/Compartments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compartments": {
"io": {
"symbols": [
"BZ2_bzWriteOpen",
"BZ2_bzWrite",
"BZ2_bzWriteClose",
"BZ2_bzWriteClose64",
"BZ2_bzReadOpen",
"BZ2_bzReadClose",
"BZ2_bzRead",
"BZ2_bzReadGetUnused",
"BZ2_bzopen",
"BZ2_bzdopen",
"BZ2_bzread",
"BZ2_bzwrite",
"BZ2_bzflush",
"BZ2_bzclose",
"BZ2_bzerror"
]
}
}
}
2 changes: 2 additions & 0 deletions lib/libbz2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ BZ2DIR= ${SRCTOP}/contrib/bzip2

LIB= bz2
SHLIB_MAJOR= 4
COMPARTMENT_POLICY= ${.CURDIR}/Compartments.json

SRCS= bzlib.c blocksort.c compress.c crctable.c decompress.c \
huffman.c randtable.c
INCS= bzlib.h
Expand Down
9 changes: 9 additions & 0 deletions lib/libz/Compartments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compartments": {
"io": {
"files": [
"gz*.*o"
]
}
}
}
1 change: 1 addition & 0 deletions lib/libz/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ CFLAGS+= -DUNALIGNED_OK

VERSION_DEF= ${.CURDIR}/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
COMPARTMENT_POLICY= ${.CURDIR}/Compartments.json

INCS= zconf.h zlib.h

Expand Down
11 changes: 11 additions & 0 deletions lib/libzstd/Compartments.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compartments": {
"io": {
"files": [
"cover.*o",
"fastcover.*o",
"zdict.*o"
]
}
}
}
2 changes: 2 additions & 0 deletions lib/libzstd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@
# explicitly disable assembly.
CFLAGS+= -DZSTD_DISABLE_ASM

COMPARTMENT_POLICY= ${.CURDIR}/Compartments.json

PRIVATELIB= yes
PACKAGE= runtime

Check warning on line 49 in lib/libzstd/Makefile

View workflow job for this annotation

GitHub Actions / Style Checker

Missing Signed-off-by: line

Check warning on line 49 in lib/libzstd/Makefile

View workflow job for this annotation

GitHub Actions / Style Checker

Missing Signed-off-by: line
ZSTDDIR= ${SRCTOP}/sys/contrib/zstd
.PATH: ${ZSTDDIR}/lib/common ${ZSTDDIR}/lib/compress \
${ZSTDDIR}/lib/decompress ${ZSTDDIR}/lib/deprecated \
Expand Down