diff --git a/.github/workflows/extensions.yaml b/.github/workflows/extensions.yaml index 349f6f7c..19b29420 100644 --- a/.github/workflows/extensions.yaml +++ b/.github/workflows/extensions.yaml @@ -57,7 +57,7 @@ jobs: - dind - large-8x8 container: - image: quay.io/tembo/trunk-test-tembo:0.0.31 + image: quay.io/tembo/trunk-test-tembo:0.0.32 options: --user root needs: - find_directories @@ -81,7 +81,7 @@ jobs: - dind - large-8x8 container: - image: quay.io/tembo/trunk-test-tembo:0.0.31 + image: quay.io/tembo/trunk-test-tembo:0.0.32 options: --user root needs: - find_directories diff --git a/contrib/postgresbson/Dockerfile b/contrib/postgresbson/Dockerfile new file mode 100644 index 00000000..e8061b24 --- /dev/null +++ b/contrib/postgresbson/Dockerfile @@ -0,0 +1,16 @@ +ARG PG_VERSION=15 +FROM quay.io/coredb/c-builder:pg${PG_VERSION} +USER root + +# Extension build dependencies +RUN apt-get update && apt-get install -y \ + libbson-dev +# Clone repository +RUN git clone https://github.com/buzzm/postgresbson.git +RUN mkdir -p ~/projects/bson/include +# For some reason these need to be in ~/projects/bson/include/ and postgresbson/ +RUN cp -r /usr/include/libbson-1.0/* ~/projects/bson/include/ +RUN cp -r /usr/include/libbson-1.0/* postgresbson/ + +# Replacing BSON_SHLIB with the path to libbson-1.0.so (https://github.com/buzzm/postgresbson/blob/5b442c42642075c43edbfc41c1e2e7e6d1034758/Makefile#L9) +RUN cd postgresbson && make BSON_SHLIB=/usr/lib/x86_64-linux-gnu/libbson-1.0.so diff --git a/contrib/postgresbson/Trunk.toml b/contrib/postgresbson/Trunk.toml new file mode 100644 index 00000000..95eb18bb --- /dev/null +++ b/contrib/postgresbson/Trunk.toml @@ -0,0 +1,24 @@ +[extension] +name = "postgresbson" +version = "2.0.0" +repository = "https://github.com/buzzm/postgresbson" +license = "MIT" +description = "This PostgreSQL extension realizes the BSON data type, together with functions to create and inspect BSON objects for the purposes of expressive and performant querying." +homepage = "https://github.com/buzzm/postgresbson" +documentation = "https://github.com/buzzm/postgresbson" +categories = ["data_transformations"] + +[dependencies] +apt = ["libc6"] + +[build] +postgres_version = "15" +platform = "linux/amd64" +dockerfile = "Dockerfile" +install_command = """ + cd postgresbson && make install + set -x + mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/15/extension + mv /usr/local/pgsql/lib/* /usr/lib/postgresql/15/lib + """ + diff --git a/images/trunk-test-tembo/Dockerfile b/images/trunk-test-tembo/Dockerfile index 350a4e81..3e4f2f0b 100644 --- a/images/trunk-test-tembo/Dockerfile +++ b/images/trunk-test-tembo/Dockerfile @@ -45,6 +45,7 @@ RUN apt-get update && apt-get install -y \ libsfcgal1 \ openjdk-11-jdk \ libaio1 \ + libbson-dev \ && rm -rf /var/lib/apt/lists/* RUN ln -s /usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so /usr/lib/x86_64-linux-gnu/libjvm.so RUN wget https://download.oracle.com/otn_software/linux/instantclient/1920000/instantclient-basiclite-linux.x64-19.20.0.0.0dbru.zip && \