Skip to content

Commit

Permalink
Eliminate old-style mv install scripting
Browse files Browse the repository at this point in the history
Update the install script configs that sill used `mv /usr/local/pgsql`
syntax that's not necessary when properly building with PGXS from these
extensions:

*   argm
*   citus
*   count_distinct
*   credcheck
*   db_migrator
*   extra_window_functions
*   h3_pg
*   pg_embedding
*   pg_ivm
*   pgroonga
*   postgresql_unit

Upgrade these extensions:

*   credcheck 3.0.0
*   pg_embedding 0.3.6
*   pgroonga 3.2.5
*   postgresql_unit 7.10.0

And do some housekeeping:

*   Upgrade to groonga 14.1.2 and require the version of
    trunk-test-tembo that includes it.
*   Rename `contrib/pg-base62` to `pg_base62` to match the name in its
    `Trunk.toml`.
*   Remove `contrib/pgbase36`, which already exists as
    `contrib/pg_base36`.
*   Remove `contrib/pg-base62`, which already exists as
    `contrib/pg_base62`.
*   Hack the postgresql_unit build to put `*.data` files in the right
    place for our images, and use `build.include` to tell Trunk to
    install them.
  • Loading branch information
theory committed Jan 3, 2025
1 parent bdb0905 commit 57846ef
Show file tree
Hide file tree
Showing 30 changed files with 117 additions and 292 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- dind
- xlarge-16x16
container:
image: quay.io/tembo/trunk-test-tembo:f3b2a28-pg15
image: quay.io/tembo/trunk-test-tembo:bdb0905-pg15
options: --user root
needs:
- find_directories
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
- dind
- xlarge-16x16
container:
image: quay.io/tembo/trunk-test-tembo:f3b2a28-pg15
image: quay.io/tembo/trunk-test-tembo:bdb0905-pg15
options: --user root
needs:
- find_directories
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trunk-install-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- dind
- large-8x8
container:
image: quay.io/tembo/trunk-test-tembo:f3b2a28-pg15
image: quay.io/tembo/trunk-test-tembo:bdb0905-pg15
options: --user root
env:
PGHOST: "localhost"
Expand Down
14 changes: 8 additions & 6 deletions contrib/argm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Set PostgreSQL version
ARG PG_VERSION=17
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Clone repository
RUN git clone https://github.com/bashtanov/argm.git

# Build extension
RUN cd argm && make
ARG EXTENSION_NAME
# ARG EXTENSION_VERSION
ARG RELEASE=b8b2db3
RUN git clone https://github.com/bashtanov/${EXTENSION_NAME}.git \
&& cd ${EXTENSION_NAME} \
&& git checkout ${RELEASE} \
&& make
8 changes: 1 addition & 7 deletions contrib/argm/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,11 @@ description = "Argm postgresql extension: argmax/argmin and anyold aggregate fun
documentation = "https://github.com/bashtanov/argm"
categories = ["query_optimizations"]


[dependencies]
apt = ["libc6"]

[build]
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd argm && 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
"""
install_command = "make -C argm install"
24 changes: 10 additions & 14 deletions contrib/citus/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Set PostgreSQL version
ARG PG_VERSION=17
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}
USER root

# Extension build dependencies
USER root
RUN apt-get update && apt-get install -y \
libcurl4-openssl-dev \
liblz4-dev \
Expand All @@ -12,15 +12,11 @@ RUN apt-get update && apt-get install -y \
libselinux1-dev \
libxslt1-dev

# Clone repository
RUN git clone https://github.com/citusdata/citus.git

# Set project version
ARG RELEASE=v12.1.6

# Build extension
RUN cd citus && \
git fetch origin ${RELEASE} && \
git checkout ${RELEASE} && \
./configure && \
make
# Download and build extension
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN curl -O https://api.pgxn.org/dist/${EXTENSION_NAME}/${EXTENSION_VERSION}/${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \
&& unzip ${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \
&& cd ${EXTENSION_NAME}-${EXTENSION_VERSION} \
&& ./configure && make
WORKDIR /app/${EXTENSION_NAME}-${EXTENSION_VERSION}
8 changes: 1 addition & 7 deletions contrib/citus/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,4 @@ apt = ["libpq5", "openssl", "libc6", "liblz4-1", "libzstd1", "libssl3", "libcurl
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd citus && 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
"""

install_command = "make install"
19 changes: 8 additions & 11 deletions contrib/count_distinct/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Set PostgreSQL version
ARG PG_VERSION=17
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Clone repository
RUN git clone https://github.com/tvondra/count_distinct.git

# Set project version
# Clone and build the extension.
ARG EXTENSION_NAME
# ARG EXTENSION_VERSION
ARG RELEASE=8f4883a

# Build extension
RUN cd count_distinct && \
# git fetch origin ${RELEASE} && \
git checkout ${RELEASE} && \
make
RUN git clone https://github.com/tvondra/${EXTENSION_NAME}.git \
&& cd ${EXTENSION_NAME} \
&& git checkout ${RELEASE} \
&& make
7 changes: 1 addition & 6 deletions contrib/count_distinct/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,4 @@ apt = ["libc6"]
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd count_distinct && 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
"""
install_command = "make -C count_distinct install"
21 changes: 8 additions & 13 deletions contrib/credcheck/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
ARG PG_VERSION=15
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}
USER root

# Extension build dependencies
RUN apt-get update && apt-get install -y \
libkrb5-dev

# Clone repository
RUN git clone https://github.com/HexaCluster/credcheck.git

ARG RELEASE=v2.8
USER root
RUN apt-get update && apt-get install -y libkrb5-dev

RUN cd credcheck && \
git fetch origin ${RELEASE} && \
git checkout ${RELEASE} && \
make
# Clone and build the extension.
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "v$(perl -E 'print shift =~ s/[.]0$//gr' "${EXTENSION_VERSION}")" https://github.com/HexaCluster/${EXTENSION_NAME}.git \
&& make -C ${EXTENSION_NAME}
9 changes: 2 additions & 7 deletions contrib/credcheck/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[extension]
name = "credcheck"
version = "2.8.0"
version = "3.0.0"
repository = "https://github.com/HexaCluster/credcheck"
license = "MIT"
description = "PostgreSQL plain credential checker"
Expand All @@ -16,9 +16,4 @@ apt = ["libc6"]
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd credcheck && 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
"""
install_command = "make -C credcheck install"
20 changes: 6 additions & 14 deletions contrib/db_migrator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
# Set PostgreSQL version
ARG PG_VERSION=17
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Extension build dependencies

# Clone repository
RUN git clone https://github.com/cybertec-postgresql/db_migrator.git

# Set project version
ARG RELEASE=RELEASE_1_0_0

# Build extension
RUN cd db_migrator && \
git fetch origin ${RELEASE} && \
git checkout ${RELEASE} && \
make
# Clone and build the extension.
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "RELEASE_$(perl -E 'print shift =~ s/\./_/gr' "${EXTENSION_VERSION}")" https://github.com/cybertec-postgresql/${EXTENSION_NAME}.git \
&& make -C ${EXTENSION_NAME}
7 changes: 1 addition & 6 deletions contrib/db_migrator/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,4 @@ categories = ["connectors"]
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd db_migrator && 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
"""
install_command = "make -C db_migrator install"
2 changes: 1 addition & 1 deletion contrib/envvar/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Extension build dependencies
# Download and build extension
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN curl -O https://api.pgxn.org/dist/${EXTENSION_NAME}/${EXTENSION_VERSION}/${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \
Expand Down
16 changes: 6 additions & 10 deletions contrib/extra_window_functions/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
ARG PG_VERSION=17
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Clone repository
RUN git clone https://github.com/xocolatl/extra_window_functions.git

ARG RELEASE=v1.0

RUN cd extra_window_functions && \
git fetch origin ${RELEASE} && \
git checkout ${RELEASE} && \
make
# Clone and build the extension.
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "v$(perl -E 'print shift =~ s/[.]0$//gr' "${EXTENSION_VERSION}")" https://github.com/xocolatl/${EXTENSION_NAME}.git \
&& make -C ${EXTENSION_NAME}
7 changes: 1 addition & 6 deletions contrib/extra_window_functions/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,4 @@ apt = ["libc6"]
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd extra_window_functions && 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
"""
install_command = "make -C extra_window_functions install"
23 changes: 8 additions & 15 deletions contrib/h3_pg/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
# Set PostgreSQL version
ARG PG_VERSION=17
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}
USER root

# Extension build dependencies
RUN apt-get update && apt-get install -y \
cmake

# Clone repository
RUN git clone https://github.com/zachasme/h3-pg.git

# Set project version
ARG RELEASE=v4.1.4
USER root
RUN apt-get update && apt-get install -y cmake

# Build extension
RUN cd h3-pg && \
git fetch origin ${RELEASE} && \
git checkout ${RELEASE} && \
make
# Clone and build the extension.
# ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "v${EXTENSION_VERSION}" https://github.com/zachasme/h3-pg.git \
&& make -C h3-pg
7 changes: 1 addition & 6 deletions contrib/h3_pg/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,4 @@ apt = ["libc6"]
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd h3-pg && 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
"""
install_command = "make -C h3-pg install"
2 changes: 1 addition & 1 deletion contrib/mobilitydb/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG PG_VERSION
# Set up iamge to copy trunk from.
FROM quay.io/tembo/trunk-test-tembo:f3b2a28-pg15 AS trunk
FROM quay.io/tembo/trunk-test-tembo:bdb0905-pg15 AS trunk
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

USER root
Expand Down
12 changes: 0 additions & 12 deletions contrib/pg-base62/Dockerfile

This file was deleted.

24 changes: 0 additions & 24 deletions contrib/pg-base62/Trunk.toml

This file was deleted.

24 changes: 7 additions & 17 deletions contrib/pg_embedding/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG PG_VERSION=15
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}
USER root

# Extension build dependencies
USER root
RUN apt-get update && apt-get install -y \
build-essential \
libreadline-dev \
Expand All @@ -15,18 +15,8 @@ RUN apt-get update && apt-get install -y \
xsltproc \
ccache

# Clone repository
RUN git clone https://github.com/postgres/postgres.git

ARG PG_RELEASE=REL_15_3

# Build extension
RUN cd postgres && \
git fetch origin ${PG_RELEASE} && \
git checkout ${PG_RELEASE} && \
./configure && \
cd contrib && \
git clone https://github.com/neondatabase/pg_embedding.git && \
cd pg_embedding && \
git checkout 710f44d && \
make USE_PGXS=1
# Clone and build the extension.
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "${EXTENSION_VERSION}" https://github.com/neondatabase/${EXTENSION_NAME}.git \
&& make -C ${EXTENSION_NAME} USE_PGXS=1
Loading

0 comments on commit 57846ef

Please sign in to comment.