diff --git a/.circleci/config.yml b/.circleci/config.yml index bb6267a5c8..4262aedd3e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,7 +37,7 @@ jobs: command: | if [ ! -e tmp_install/bin/postgres ]; then sudo apt update - sudo apt install build-essential libreadline-dev zlib1g-dev flex bison + sudo apt install build-essential libreadline-dev zlib1g-dev flex bison libseccomp-dev fi # Build postgres if the restore_cache didn't find a build. diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index cba861d703..e2f9b3bf3d 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -35,7 +35,7 @@ jobs: - name: Install postgres dependencies run: | sudo apt update - sudo apt install build-essential libreadline-dev zlib1g-dev flex bison + sudo apt install build-essential libreadline-dev zlib1g-dev flex bison libseccomp-dev - name: Set pg revision for caching id: pg_ver diff --git a/Makefile b/Makefile index 7b6d101649..7772d09474 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,11 @@ +# Seccomp BPF is only available for Linux +UNAME_S := $(shell uname -s) +ifeq ($(UNAME_S),Linux) + SECCOMP = --with-libseccomp +else + SECCOMP = +endif + # # Top level Makefile to build Zenith and PostgreSQL # @@ -21,8 +29,12 @@ tmp_install/build/config.status: +@echo "Configuring postgres build" mkdir -p tmp_install/build (cd tmp_install/build && \ - ../../vendor/postgres/configure CFLAGS='-O0 $(CFLAGS)' --enable-debug --enable-cassert \ - --enable-depend --prefix=$(abspath tmp_install) > configure.log) + ../../vendor/postgres/configure CFLAGS='-O0 -g3 $(CFLAGS)' \ + --enable-cassert \ + --enable-debug \ + --enable-depend \ + $(SECCOMP) \ + --prefix=$(abspath tmp_install) > configure.log) # nicer alias for running 'configure' postgres-configure: tmp_install/build/config.status diff --git a/README.md b/README.md index a1edee816a..96b82b9430 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Zenith substitutes PostgreSQL storage layer and redistributes data across a clus On Ubuntu or Debian this set of packages should be sufficient to build the code: ```text -apt install build-essential libtool libreadline-dev zlib1g-dev flex bison \ +apt install build-essential libtool libreadline-dev zlib1g-dev flex bison libseccomp-dev \ libssl-dev clang ``` diff --git a/vendor/postgres b/vendor/postgres index a08f50cba2..8478beabaf 160000 --- a/vendor/postgres +++ b/vendor/postgres @@ -1 +1 @@ -Subproject commit a08f50cba293fff045cb771f8c6bb23b89f4f7f7 +Subproject commit 8478beabaf7d6916d22bde99ee5a577a9b6b237c