Skip to content

Commit

Permalink
Merge branch 'main' into PG-1013-DOC-pg_tde-for-PG17
Browse files Browse the repository at this point in the history
  • Loading branch information
nastena1606 authored Dec 4, 2024
2 parents 48e4970 + cdb2ad6 commit 0ba043d
Show file tree
Hide file tree
Showing 72 changed files with 1,392 additions and 9,244 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ jobs:
- name: Configure postgres
run: ./configure

- name: Configure pg_tde
run: ./configure
working-directory: contrib/pg_tde

- name: Install perltidy
run: sudo cpan -T SHANCOCK/Perl-Tidy-20230309.tar.gz

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1

- name: Build
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
file: docker/Dockerfile
load: true # Put image in local docker
Expand All @@ -44,7 +44,7 @@ jobs:

- name: Push
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
file: docker/Dockerfile
push: true
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/postgresql-16-ppg-package-pgxs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: |
sudo apt-get install -y libreadline6-dev systemtap-sdt-dev wget \
zlib1g-dev libssl-dev libpam0g-dev bison flex libipc-run-perl \
libcurl4-openssl-dev libhttp-server-simple-perl
libcurl4-openssl-dev libhttp-server-simple-perl python3-pykmip
sudo /usr/bin/perl -MCPAN -e 'install IPC::Run'
sudo /usr/bin/perl -MCPAN -e 'install Text::Trim'
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
Expand Down Expand Up @@ -64,22 +64,34 @@ jobs:
with:
path: 'src/pg_tde'

- name: Checkout libkmip submodule
run: |
git submodule update --init --recursive
working-directory: src/pg_tde

- name: Change src owner to postgres
run: |
sudo chmod o+rx ~
sudo chown -R postgres:postgres src
- name: Build pg_tde
run: |
sudo -u postgres bash -c './configure'
sudo -u postgres bash -c 'make USE_PGXS=1'
sudo make USE_PGXS=1 install
working-directory: src/pg_tde

- name: Setup kmip 1
run: |
wget https://raw.githubusercontent.com/OpenKMIP/PyKMIP/refs/heads/master/bin/create_certificates.py
python3 create_certificates.py
cat client_certificate_jane_doe.pem >> client_key_jane_doe.pem
working-directory: /tmp

- name: Start pg_tde tests
run: |
TV=$(mktemp)
{ exec >$TV; vault server -dev; } &
pykmip-server -f `pwd`/../contrib/pg_tde/pykmip-server.conf -l /tmp/kmip-server.log &
sleep 10
export ROOT_TOKEN=$(cat $TV | grep "Root Token" | cut -d ":" -f 2 | xargs echo -n)
echo "Root token: $ROOT_TOKEN"
Expand Down
83 changes: 0 additions & 83 deletions .github/workflows/postgresql-16-src-make-macos.yml

This file was deleted.

16 changes: 14 additions & 2 deletions .github/workflows/postgresql-16-src-make-ssl11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \
libsystemd-dev gettext tcl-dev libperl-dev pkg-config \
libselinux1-dev python3-dev libhttp-server-simple-perl\
uuid-dev liblz4-dev libcurl4-openssl-dev
uuid-dev liblz4-dev libcurl4-openssl-dev python3-pykmip
sudo /usr/bin/perl -MCPAN -e 'install IPC::Run'
sudo /usr/bin/perl -MCPAN -e 'install Text::Trim'
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
Expand All @@ -47,6 +47,11 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: 'src/contrib/pg_tde'

- name: Checkout libkmip submodule
run: |
git submodule update --init --recursive
working-directory: src/contrib/pg_tde

- name: Create pgsql dir
run: mkdir -p /opt/pgsql
Expand All @@ -60,7 +65,6 @@ jobs:

- name: Build pg_tde
run: |
./configure
make -j MAJORVERSION=16
sudo make install
working-directory: src/contrib/pg_tde
Expand All @@ -74,10 +78,18 @@ jobs:
/opt/pgsql/data/postgresql.conf
pg_ctl -D /opt/pgsql/data -l logfile start
- name: Setup kmip 1
run: |
wget https://raw.githubusercontent.com/OpenKMIP/PyKMIP/refs/heads/master/bin/create_certificates.py
python3 create_certificates.py
cat client_certificate_jane_doe.pem >> client_key_jane_doe.pem
working-directory: /tmp

- name: Test pg_tde
run: |
TV=$(mktemp)
{ exec >$TV; vault server -dev; } &
pykmip-server -f `pwd`/../contrib/pg_tde/pykmip-server.conf -l /tmp/kmip-server.log &
sleep 10
export ROOT_TOKEN=$(cat $TV | grep "Root Token" | cut -d ":" -f 2 | xargs echo -n)
echo "Root token: $ROOT_TOKEN"
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/postgresql-16-src-make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \
libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \
llvm-11 llvm-11-dev libselinux1-dev python3-dev \
uuid-dev liblz4-dev libcurl4-openssl-dev libhttp-server-simple-perl
uuid-dev liblz4-dev libcurl4-openssl-dev libhttp-server-simple-perl python3-pykmip
sudo /usr/bin/perl -MCPAN -e 'install IPC::Run'
sudo /usr/bin/perl -MCPAN -e 'install Text::Trim'
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
Expand All @@ -47,6 +47,11 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: 'src/contrib/pg_tde'

- name: Checkout libkmip submodule
run: |
git submodule update --init --recursive
working-directory: src/contrib/pg_tde

- name: Create pgsql dir
run: mkdir -p /opt/pgsql
Expand All @@ -60,7 +65,6 @@ jobs:

- name: Build pg_tde
run: |
./configure
make -j MAJORVERSION=16
sudo make install
working-directory: src/contrib/pg_tde
Expand All @@ -73,11 +77,19 @@ jobs:
echo "shared_preload_libraries = 'pg_tde'" >> \
/opt/pgsql/data/postgresql.conf
pg_ctl -D /opt/pgsql/data -l logfile start
- name: Setup kmip 1
run: |
wget https://raw.githubusercontent.com/OpenKMIP/PyKMIP/refs/heads/master/bin/create_certificates.py
python3 create_certificates.py
cat client_certificate_jane_doe.pem >> client_key_jane_doe.pem
working-directory: /tmp

- name: Test pg_tde
run: |
TV=$(mktemp)
{ exec >$TV; vault server -dev; } &
pykmip-server -f `pwd`/../contrib/pg_tde/pykmip-server.conf -l /tmp/kmip-server.log &
sleep 10
export ROOT_TOKEN=$(cat $TV | grep "Root Token" | cut -d ":" -f 2 | xargs echo -n)
echo "Root token: $ROOT_TOKEN"
Expand Down
67 changes: 0 additions & 67 deletions .github/workflows/postgresql-16-src-meson-macos.yml

This file was deleted.

15 changes: 14 additions & 1 deletion .github/workflows/postgresql-16-src-meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \
llvm-11 llvm-11-dev libselinux1-dev python3-dev \
uuid-dev liblz4-dev meson ninja-build \
gpg wget libcurl4-openssl-dev libhttp-server-simple-perl
gpg wget libcurl4-openssl-dev libhttp-server-simple-perl python3-pykmip
sudo /usr/bin/perl -MCPAN -e 'install IPC::Run'
sudo /usr/bin/perl -MCPAN -e 'install Text::Trim'
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
Expand All @@ -48,6 +48,11 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
path: 'src/contrib/pg_tde'

- name: Checkout libkmip submodule
run: |
git submodule update --init --recursive
working-directory: src/contrib/pg_tde

- name: Include pg_tde in meson build
run: |
Expand All @@ -58,11 +63,19 @@ jobs:
meson setup build --prefix `pwd`/../inst --buildtype=debug -Dcassert=true
cd build && ninja && ninja install
working-directory: src

- name: Setup kmip 1
run: |
wget https://raw.githubusercontent.com/OpenKMIP/PyKMIP/refs/heads/master/bin/create_certificates.py
python3 create_certificates.py
cat client_certificate_jane_doe.pem >> client_key_jane_doe.pem
working-directory: /tmp

- name: Test pg_tde
run: |
TV=$(mktemp)
{ exec >$TV; vault server -dev; } &
pykmip-server -f `pwd`/../contrib/pg_tde/pykmip-server.conf -l /tmp/kmip-server.log &
sleep 10
export ROOT_TOKEN=$(cat $TV | grep "Root Token" | cut -d ":" -f 2 | xargs echo -n)
echo "Root token: $ROOT_TOKEN"
Expand Down
Loading

0 comments on commit 0ba043d

Please sign in to comment.