From f8fcc6110052e19d74ba89c67f29040ef853d3e4 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 1 Jan 2025 12:32:34 +0900 Subject: [PATCH 1/7] Add CI jobs for PostgreSQL 17 Closes GH-195 --- .github/workflows/package.yaml | 2 + ...rrow-flight-sql-postgresql-package-task.rb | 2 + package/postgresql-17-pgdg/Dockerfile | 36 ++++++++++ package/postgresql-17-pgdg/Rakefile | 32 +++++++++ .../apt/debian-bookworm-amd64/Dockerfile | 68 +++++++++++++++++++ .../apt/ubuntu-noble-amd64/Dockerfile | 65 ++++++++++++++++++ package/postgresql-17-pgdg/debian/changelog | 0 package/postgresql-17-pgdg/debian/control | 41 +++++++++++ package/postgresql-17-pgdg/debian/copyright | 26 +++++++ package/postgresql-17-pgdg/debian/rules | 37 ++++++++++ 10 files changed, 309 insertions(+) create mode 100644 package/postgresql-17-pgdg/Dockerfile create mode 100644 package/postgresql-17-pgdg/Rakefile create mode 100644 package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile create mode 100644 package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile create mode 100644 package/postgresql-17-pgdg/debian/changelog create mode 100644 package/postgresql-17-pgdg/debian/control create mode 100644 package/postgresql-17-pgdg/debian/copyright create mode 100755 package/postgresql-17-pgdg/debian/rules diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index 0ad4a1f..2ff4fa7 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -80,6 +80,8 @@ jobs: - "ubuntu-jammy-amd64-postgresql-15-pgdg" - "debian-bookworm-amd64-postgresql-16-pgdg" - "ubuntu-jammy-amd64-postgresql-16-pgdg" + - "debian-bookworm-amd64-postgresql-17-pgdg" + - "ubuntu-noble-amd64-postgresql-17-pgdg" steps: - uses: actions/checkout@v4 with: diff --git a/package/arrow-flight-sql-postgresql-package-task.rb b/package/arrow-flight-sql-postgresql-package-task.rb index 072fb49..099942c 100644 --- a/package/arrow-flight-sql-postgresql-package-task.rb +++ b/package/arrow-flight-sql-postgresql-package-task.rb @@ -75,6 +75,8 @@ def apt_targets_default # "debian-bookworm-arm64", "ubuntu-jammy-amd64", # "ubuntu-jammy-arm64", + "ubuntu-noble-amd64", + # "ubuntu-noble-arm64", ] end diff --git a/package/postgresql-17-pgdg/Dockerfile b/package/postgresql-17-pgdg/Dockerfile new file mode 100644 index 0000000..3b54ddc --- /dev/null +++ b/package/postgresql-17-pgdg/Dockerfile @@ -0,0 +1,36 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +FROM postgres:17-bookworm + +COPY package/docker/postgresql-16-pgdg-apache-arrow-flight-sql_*_amd64.deb ./ +RUN \ + apt update && \ + apt install -y -V lsb-release wget && \ + wget https://apache.jfrog.io/artifactory/arrow/debian/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \ + apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \ + rm apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \ + apt update && \ + apt install -y -V \ + ./postgresql-16-pgdg-apache-arrow-flight-sql_*.deb && \ + rm -f postgresql-16-pgdg-apache-arrow-flight-sql_*.deb && \ + apt clean && \ + rm -rf /var/lib/apt/lists/* + +COPY package/docker/apache-arrow-flight-sql-enable.sh /docker-entrypoint-initdb.d/ + +EXPOSE 15432 diff --git a/package/postgresql-17-pgdg/Rakefile b/package/postgresql-17-pgdg/Rakefile new file mode 100644 index 0000000..eba15f4 --- /dev/null +++ b/package/postgresql-17-pgdg/Rakefile @@ -0,0 +1,32 @@ +# -*- ruby -*- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +require_relative "../arrow-flight-sql-postgresql-package-task" + +class PostgreSQL17PGDGPackageTask < ArrowFlightSQLPostgreSQLPackageTask + def initialize + super("postgresql-17-pgdg-apache-arrow-flight-sql") + end + + def enable_yum? + false + end +end + +PostgreSQL17PGDGPackageTask.new.define diff --git a/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile b/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile new file mode 100644 index 0000000..01e6e4b --- /dev/null +++ b/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile @@ -0,0 +1,68 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +ARG FROM=debian:bookworm +FROM ${FROM} + +RUN \ + echo "debconf debconf/frontend select Noninteractive" | \ + debconf-set-selections + +RUN \ + echo 'APT::Install-Recommends "false";' > \ + /etc/apt/apt.conf.d/disable-install-recommends + +RUN \ + sed -i'' -e 's/main$/main contrib non-free/g' \ + /etc/apt/sources.list.d/debian.sources + +ARG DEBUG +RUN \ + quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ + apt update ${quiet} && \ + apt install -y -V ${quiet} \ + ca-certificates \ + gpg \ + lsb-release \ + wget && \ + distribution=$(lsb_release --id --short | tr 'A-Z' 'a-z') && \ + code_name=$(lsb_release --codename --short) && \ + wget https://apache.jfrog.io/artifactory/arrow/${distribution}/apache-arrow-apt-source-latest-${code_name}.deb && \ + apt install -y -V ${quiet} \ + ./apache-arrow-apt-source-latest-${code_name}.deb && \ + rm apache-arrow-apt-source-latest-${code_name}.deb && \ + wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ + gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - && \ + (echo "Types: deb"; \ + echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \ + echo "Suites: ${code_name}-pgdg"; \ + echo "Components: main"; \ + echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \ + tee /etc/apt/sources.list.d/pgdg.sources && \ + apt update && \ + apt install -y -V ${quiet} \ + build-essential \ + ccache \ + cmake \ + debhelper \ + devscripts \ + libarrow-flight-sql-dev \ + libkrb5-dev \ + meson \ + ninja-build \ + postgresql-server-dev-16 && \ + apt clean diff --git a/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile b/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile new file mode 100644 index 0000000..2d6fa54 --- /dev/null +++ b/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile @@ -0,0 +1,65 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +ARG FROM=ubuntu:24.04 +FROM ${FROM} + +RUN \ + echo "debconf debconf/frontend select Noninteractive" | \ + debconf-set-selections + +RUN \ + echo 'APT::Install-Recommends "false";' > \ + /etc/apt/apt.conf.d/disable-install-recommends + +ARG DEBUG +RUN \ + quiet=$([ "${DEBUG}" = "yes" ] || echo "-qq") && \ + apt update ${quiet} && \ + apt install -y -V ${quiet} \ + ca-certificates \ + gpg \ + lsb-release \ + wget && \ + distribution=$(lsb_release --id --short | tr 'A-Z' 'a-z') && \ + code_name=$(lsb_release --codename --short) && \ + wget https://apache.jfrog.io/artifactory/arrow/${distribution}/apache-arrow-apt-source-latest-${code_name}.deb && \ + apt install -y -V ${quiet} \ + ./apache-arrow-apt-source-latest-${code_name}.deb && \ + rm apache-arrow-apt-source-latest-${code_name}.deb && \ + wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ + gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - && \ + (echo "Types: deb"; \ + echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \ + echo "Suites: ${code_name}-pgdg"; \ + echo "Components: main"; \ + echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \ + tee /etc/apt/sources.list.d/pgdg.sources && \ + apt update && \ + apt install -y -V ${quiet} \ + build-essential \ + ccache \ + cmake \ + debhelper \ + devscripts \ + libarrow-flight-sql-dev \ + libkrb5-dev \ + meson \ + ninja-build \ + pkg-config \ + postgresql-server-dev-16 && \ + apt clean diff --git a/package/postgresql-17-pgdg/debian/changelog b/package/postgresql-17-pgdg/debian/changelog new file mode 100644 index 0000000..e69de29 diff --git a/package/postgresql-17-pgdg/debian/control b/package/postgresql-17-pgdg/debian/control new file mode 100644 index 0000000..56af282 --- /dev/null +++ b/package/postgresql-17-pgdg/debian/control @@ -0,0 +1,41 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +Source: postgresql-17-pgdg-apache-arrow-flight-sql +Section: database +Priority: optional +Maintainer: Apache Arrow Developers +Build-Depends: + cmake, + debhelper-compat (= 13), + libarrow-flight-sql-dev, + libkrb5-dev, + meson, + postgresql-server-dev-17 +Standards-Version: 4.6.0 +Homepage: https://arrow.apache.org/flight-sql-postgresql/ + +Package: postgresql-17-pgdg-apache-arrow-flight-sql +Architecture: any +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + postgresql-17 +Description: Apache Arrow Flight SQL adapter for PostgreSQL + . + It provides a PostgreSQL module that adds Apache Arrow Flight SQL + interface to PostgreSQL. diff --git a/package/postgresql-17-pgdg/debian/copyright b/package/postgresql-17-pgdg/debian/copyright new file mode 100644 index 0000000..c2452ee --- /dev/null +++ b/package/postgresql-17-pgdg/debian/copyright @@ -0,0 +1,26 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Contact: Apache Arrow Developers +Source: https://packages.groonga.org/source/pgroonga/ + +Files: * +Copyright: 2022-2023 Apache Arrow Developers +License: Apache-2.0 + +License: Apache-2.0 + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + . + https://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian systems, the full text of the Apache Software License version 2 can + be found in the file `/usr/share/common-licenses/Apache-2.0'. diff --git a/package/postgresql-17-pgdg/debian/rules b/package/postgresql-17-pgdg/debian/rules new file mode 100755 index 0000000..1f4fdc9 --- /dev/null +++ b/package/postgresql-17-pgdg/debian/rules @@ -0,0 +1,37 @@ +#!/usr/bin/make -f +# -*- makefile-gmake -*- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 +# This has to be exported to make some magic below work. +export DH_OPTIONS + +export DEB_BUILD_MAINT_OPTIONS=reproducible=-timeless + +%: + dh $@ + +override_dh_auto_configure: + dh_auto_configure \ + --buildsystem=meson+ninja \ + -- \ + --buildtype=debugoptimized + +override_dh_auto_test: From 4faf613f2e86d34b94dfdc191f5e56aea0be4fdb Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 1 Jan 2025 14:16:51 +0900 Subject: [PATCH 2/7] Use 17 --- package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile | 2 +- package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile b/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile index 01e6e4b..1fb86f5 100644 --- a/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile +++ b/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile @@ -64,5 +64,5 @@ RUN \ libkrb5-dev \ meson \ ninja-build \ - postgresql-server-dev-16 && \ + postgresql-server-dev-17 && \ apt clean diff --git a/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile b/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile index 2d6fa54..a0dd4a5 100644 --- a/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile +++ b/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile @@ -61,5 +61,5 @@ RUN \ meson \ ninja-build \ pkg-config \ - postgresql-server-dev-16 && \ + postgresql-server-dev-17 && \ apt clean From 9265b46f9a5f2225da59e32b9181f043075c6e0b Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 1 Jan 2025 14:26:01 +0900 Subject: [PATCH 3/7] Use asc --- .github/workflows/test.yaml | 1 + ci/scripts/prepare-ubuntu.sh | 6 ++++-- package/apt/test.sh | 6 ++++-- .../apt/debian-bookworm-amd64/Dockerfile | 7 +++++-- .../postgresql-15-pgdg/apt/ubuntu-jammy-amd64/Dockerfile | 7 +++++-- .../apt/debian-bookworm-amd64/Dockerfile | 7 +++++-- .../postgresql-16-pgdg/apt/ubuntu-jammy-amd64/Dockerfile | 7 +++++-- package/postgresql-17-pgdg/Dockerfile | 6 +++--- .../apt/debian-bookworm-amd64/Dockerfile | 7 +++++-- .../postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile | 7 +++++-- 10 files changed, 42 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 93a1baa..78dd0e6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -42,6 +42,7 @@ jobs: postgresql-version: - "15" - "16" + - "17" steps: - uses: actions/checkout@v4 - name: Prepare diff --git a/ci/scripts/prepare-ubuntu.sh b/ci/scripts/prepare-ubuntu.sh index 41770d4..7e5d8b1 100755 --- a/ci/scripts/prepare-ubuntu.sh +++ b/ci/scripts/prepare-ubuntu.sh @@ -35,12 +35,14 @@ wget https://apache.jfrog.io/artifactory/arrow/${os}/${apt_source_deb} sudo apt install -y -V ./${apt_source_deb} wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - sudo gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - + gpg --no-default-keyring --keyring ./pgdg.kbx --import - +gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor | \ + tee /usr/share/keyrings/pgdg.asc (echo "Types: deb"; \ echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \ echo "Suites: ${code_name}-pgdg"; \ echo "Components: main"; \ - echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \ + echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \ sudo tee /etc/apt/sources.list.d/pgdg.sources sudo apt update diff --git a/package/apt/test.sh b/package/apt/test.sh index 27113df..81e8631 100755 --- a/package/apt/test.sh +++ b/package/apt/test.sh @@ -96,12 +96,14 @@ case "${TYPE}" in esac wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - + gpg --no-default-keyring --keyring ./pgdg.kbx --import - +gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor | \ + tee /usr/share/keyrings/pgdg.asc (echo "Types: deb"; \ echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \ echo "Suites: ${code_name}-pgdg"; \ echo "Components: main"; \ - echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \ + echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \ tee /etc/apt/sources.list.d/pgdg.sources echo "::endgroup::" diff --git a/package/postgresql-15-pgdg/apt/debian-bookworm-amd64/Dockerfile b/package/postgresql-15-pgdg/apt/debian-bookworm-amd64/Dockerfile index 546a8ac..713b65e 100644 --- a/package/postgresql-15-pgdg/apt/debian-bookworm-amd64/Dockerfile +++ b/package/postgresql-15-pgdg/apt/debian-bookworm-amd64/Dockerfile @@ -46,12 +46,15 @@ RUN \ ./apache-arrow-apt-source-latest-${code_name}.deb && \ rm apache-arrow-apt-source-latest-${code_name}.deb && \ wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \ + /usr/share/keyrings/pgdg.asc && \ + rm pgdg.kbx && \ (echo "Types: deb"; \ echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \ echo "Suites: ${code_name}-pgdg"; \ echo "Components: main"; \ - echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \ + echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \ tee /etc/apt/sources.list.d/pgdg.sources && \ apt update && \ apt install -y -V ${quiet} \ diff --git a/package/postgresql-15-pgdg/apt/ubuntu-jammy-amd64/Dockerfile b/package/postgresql-15-pgdg/apt/ubuntu-jammy-amd64/Dockerfile index 174e15e..43ec5c4 100644 --- a/package/postgresql-15-pgdg/apt/ubuntu-jammy-amd64/Dockerfile +++ b/package/postgresql-15-pgdg/apt/ubuntu-jammy-amd64/Dockerfile @@ -42,12 +42,15 @@ RUN \ ./apache-arrow-apt-source-latest-${code_name}.deb && \ rm apache-arrow-apt-source-latest-${code_name}.deb && \ wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \ + /usr/share/keyrings/pgdg.asc && \ + rm pgdg.kbx && \ (echo "Types: deb"; \ echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \ echo "Suites: ${code_name}-pgdg"; \ echo "Components: main"; \ - echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \ + echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \ tee /etc/apt/sources.list.d/pgdg.sources && \ apt update && \ apt install -y -V ${quiet} \ diff --git a/package/postgresql-16-pgdg/apt/debian-bookworm-amd64/Dockerfile b/package/postgresql-16-pgdg/apt/debian-bookworm-amd64/Dockerfile index 01e6e4b..4b415b4 100644 --- a/package/postgresql-16-pgdg/apt/debian-bookworm-amd64/Dockerfile +++ b/package/postgresql-16-pgdg/apt/debian-bookworm-amd64/Dockerfile @@ -46,12 +46,15 @@ RUN \ ./apache-arrow-apt-source-latest-${code_name}.deb && \ rm apache-arrow-apt-source-latest-${code_name}.deb && \ wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \ + /usr/share/keyrings/pgdg.asc && \ + rm pgdg.kbx && \ (echo "Types: deb"; \ echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \ echo "Suites: ${code_name}-pgdg"; \ echo "Components: main"; \ - echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \ + echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \ tee /etc/apt/sources.list.d/pgdg.sources && \ apt update && \ apt install -y -V ${quiet} \ diff --git a/package/postgresql-16-pgdg/apt/ubuntu-jammy-amd64/Dockerfile b/package/postgresql-16-pgdg/apt/ubuntu-jammy-amd64/Dockerfile index 18105ff..9f2e6e5 100644 --- a/package/postgresql-16-pgdg/apt/ubuntu-jammy-amd64/Dockerfile +++ b/package/postgresql-16-pgdg/apt/ubuntu-jammy-amd64/Dockerfile @@ -42,12 +42,15 @@ RUN \ ./apache-arrow-apt-source-latest-${code_name}.deb && \ rm apache-arrow-apt-source-latest-${code_name}.deb && \ wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \ + /usr/share/keyrings/pgdg.asc && \ + rm pgdg.kbx && \ (echo "Types: deb"; \ echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \ echo "Suites: ${code_name}-pgdg"; \ echo "Components: main"; \ - echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \ + echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \ tee /etc/apt/sources.list.d/pgdg.sources && \ apt update && \ apt install -y -V ${quiet} \ diff --git a/package/postgresql-17-pgdg/Dockerfile b/package/postgresql-17-pgdg/Dockerfile index 3b54ddc..ab706be 100644 --- a/package/postgresql-17-pgdg/Dockerfile +++ b/package/postgresql-17-pgdg/Dockerfile @@ -17,7 +17,7 @@ FROM postgres:17-bookworm -COPY package/docker/postgresql-16-pgdg-apache-arrow-flight-sql_*_amd64.deb ./ +COPY package/docker/postgresql-17-pgdg-apache-arrow-flight-sql_*_amd64.deb ./ RUN \ apt update && \ apt install -y -V lsb-release wget && \ @@ -26,8 +26,8 @@ RUN \ rm apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \ apt update && \ apt install -y -V \ - ./postgresql-16-pgdg-apache-arrow-flight-sql_*.deb && \ - rm -f postgresql-16-pgdg-apache-arrow-flight-sql_*.deb && \ + ./postgresql-17-pgdg-apache-arrow-flight-sql_*.deb && \ + rm -f postgresql-17-pgdg-apache-arrow-flight-sql_*.deb && \ apt clean && \ rm -rf /var/lib/apt/lists/* diff --git a/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile b/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile index 1fb86f5..79b6bf3 100644 --- a/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile +++ b/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile @@ -46,12 +46,15 @@ RUN \ ./apache-arrow-apt-source-latest-${code_name}.deb && \ rm apache-arrow-apt-source-latest-${code_name}.deb && \ wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \ + /usr/share/keyrings/pgdg.asc && \ + rm pgdg.kbx && \ (echo "Types: deb"; \ echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \ echo "Suites: ${code_name}-pgdg"; \ echo "Components: main"; \ - echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \ + echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \ tee /etc/apt/sources.list.d/pgdg.sources && \ apt update && \ apt install -y -V ${quiet} \ diff --git a/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile b/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile index a0dd4a5..bd38e54 100644 --- a/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile +++ b/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile @@ -42,12 +42,15 @@ RUN \ ./apache-arrow-apt-source-latest-${code_name}.deb && \ rm apache-arrow-apt-source-latest-${code_name}.deb && \ wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --no-default-keyring --keyring /usr/share/keyrings/pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \ + /usr/share/keyrings/pgdg.asc && \ + rm pgdg.kbx && \ (echo "Types: deb"; \ echo "URIs: http://apt.postgresql.org/pub/repos/apt"; \ echo "Suites: ${code_name}-pgdg"; \ echo "Components: main"; \ - echo "Signed-By: /usr/share/keyrings/pgdg.gpg") | \ + echo "Signed-By: /usr/share/keyrings/pgdg.asc") | \ tee /etc/apt/sources.list.d/pgdg.sources && \ apt update && \ apt install -y -V ${quiet} \ From bb36e28ef67c604f01f7069df645b14947a461e1 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 1 Jan 2025 14:29:58 +0900 Subject: [PATCH 4/7] Fix path --- package/postgresql-15-pgdg/apt/debian-bookworm-amd64/Dockerfile | 2 +- package/postgresql-15-pgdg/apt/ubuntu-jammy-amd64/Dockerfile | 2 +- package/postgresql-16-pgdg/apt/debian-bookworm-amd64/Dockerfile | 2 +- package/postgresql-16-pgdg/apt/ubuntu-jammy-amd64/Dockerfile | 2 +- package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile | 2 +- package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package/postgresql-15-pgdg/apt/debian-bookworm-amd64/Dockerfile b/package/postgresql-15-pgdg/apt/debian-bookworm-amd64/Dockerfile index 713b65e..475f6ec 100644 --- a/package/postgresql-15-pgdg/apt/debian-bookworm-amd64/Dockerfile +++ b/package/postgresql-15-pgdg/apt/debian-bookworm-amd64/Dockerfile @@ -46,7 +46,7 @@ RUN \ ./apache-arrow-apt-source-latest-${code_name}.deb && \ rm apache-arrow-apt-source-latest-${code_name}.deb && \ wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --no-default-keyring --keyring ./pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.kbx --import - && \ gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \ /usr/share/keyrings/pgdg.asc && \ rm pgdg.kbx && \ diff --git a/package/postgresql-15-pgdg/apt/ubuntu-jammy-amd64/Dockerfile b/package/postgresql-15-pgdg/apt/ubuntu-jammy-amd64/Dockerfile index 43ec5c4..a936980 100644 --- a/package/postgresql-15-pgdg/apt/ubuntu-jammy-amd64/Dockerfile +++ b/package/postgresql-15-pgdg/apt/ubuntu-jammy-amd64/Dockerfile @@ -42,7 +42,7 @@ RUN \ ./apache-arrow-apt-source-latest-${code_name}.deb && \ rm apache-arrow-apt-source-latest-${code_name}.deb && \ wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --no-default-keyring --keyring ./pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.kbx --import - && \ gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \ /usr/share/keyrings/pgdg.asc && \ rm pgdg.kbx && \ diff --git a/package/postgresql-16-pgdg/apt/debian-bookworm-amd64/Dockerfile b/package/postgresql-16-pgdg/apt/debian-bookworm-amd64/Dockerfile index 4b415b4..4a6c25f 100644 --- a/package/postgresql-16-pgdg/apt/debian-bookworm-amd64/Dockerfile +++ b/package/postgresql-16-pgdg/apt/debian-bookworm-amd64/Dockerfile @@ -46,7 +46,7 @@ RUN \ ./apache-arrow-apt-source-latest-${code_name}.deb && \ rm apache-arrow-apt-source-latest-${code_name}.deb && \ wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --no-default-keyring --keyring ./pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.kbx --import - && \ gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \ /usr/share/keyrings/pgdg.asc && \ rm pgdg.kbx && \ diff --git a/package/postgresql-16-pgdg/apt/ubuntu-jammy-amd64/Dockerfile b/package/postgresql-16-pgdg/apt/ubuntu-jammy-amd64/Dockerfile index 9f2e6e5..7038947 100644 --- a/package/postgresql-16-pgdg/apt/ubuntu-jammy-amd64/Dockerfile +++ b/package/postgresql-16-pgdg/apt/ubuntu-jammy-amd64/Dockerfile @@ -42,7 +42,7 @@ RUN \ ./apache-arrow-apt-source-latest-${code_name}.deb && \ rm apache-arrow-apt-source-latest-${code_name}.deb && \ wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --no-default-keyring --keyring ./pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.kbx --import - && \ gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \ /usr/share/keyrings/pgdg.asc && \ rm pgdg.kbx && \ diff --git a/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile b/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile index 79b6bf3..5a41e05 100644 --- a/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile +++ b/package/postgresql-17-pgdg/apt/debian-bookworm-amd64/Dockerfile @@ -46,7 +46,7 @@ RUN \ ./apache-arrow-apt-source-latest-${code_name}.deb && \ rm apache-arrow-apt-source-latest-${code_name}.deb && \ wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --no-default-keyring --keyring ./pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.kbx --import - && \ gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \ /usr/share/keyrings/pgdg.asc && \ rm pgdg.kbx && \ diff --git a/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile b/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile index bd38e54..5a733a7 100644 --- a/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile +++ b/package/postgresql-17-pgdg/apt/ubuntu-noble-amd64/Dockerfile @@ -42,7 +42,7 @@ RUN \ ./apache-arrow-apt-source-latest-${code_name}.deb && \ rm apache-arrow-apt-source-latest-${code_name}.deb && \ wget -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ - gpg --no-default-keyring --keyring ./pgdg.gpg --import - && \ + gpg --no-default-keyring --keyring ./pgdg.kbx --import - && \ gpg --no-default-keyring --keyring ./pgdg.kbx --export --armor > \ /usr/share/keyrings/pgdg.asc && \ rm pgdg.kbx && \ From 87165703aca39069934a9aaff04effa5de9dc2f9 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 1 Jan 2025 14:31:40 +0900 Subject: [PATCH 5/7] Add 17 --- .github/workflows/verify-rc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/verify-rc.yaml b/.github/workflows/verify-rc.yaml index 86a966b..d9a5a3f 100644 --- a/.github/workflows/verify-rc.yaml +++ b/.github/workflows/verify-rc.yaml @@ -41,6 +41,7 @@ jobs: postgresql-version: - "15" - "16" + - "17" steps: - uses: actions/checkout@v4 - name: Prepare From 79b690e0121c50b3cdd9e637fd4b9a622857de2a Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 1 Jan 2025 15:23:18 +0900 Subject: [PATCH 6/7] Set copy_function --- src/afs.cc | 2 +- test/helper/sandbox.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/afs.cc b/src/afs.cc index 37f5bab..a049fed 100644 --- a/src/afs.cc +++ b/src/afs.cc @@ -578,7 +578,7 @@ static dshash_parameters SessionsParams = { sizeof(SharedSessionData), dshash_memcmp, dshash_memhash, - 0, // Set later because this is determined dynamically. + dshash_memcpy, }; struct SharedData { diff --git a/test/helper/sandbox.rb b/test/helper/sandbox.rb index bbbf9b9..a4b0c6e 100644 --- a/test/helper/sandbox.rb +++ b/test/helper/sandbox.rb @@ -57,8 +57,8 @@ def read_command_output(input) def run_command(*args) pid, output_read, error_read = spawn_process(*args) - output = "" - error = "" + output = +"" + error = +"" status = nil timeout = 1 loop do From b0a5a0d43ef30cebef863ed573f62df117c72b70 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 1 Jan 2025 16:10:31 +0900 Subject: [PATCH 7/7] Add #if --- src/afs.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/afs.cc b/src/afs.cc index a049fed..eb24161 100644 --- a/src/afs.cc +++ b/src/afs.cc @@ -578,7 +578,10 @@ static dshash_parameters SessionsParams = { sizeof(SharedSessionData), dshash_memcmp, dshash_memhash, +#if PG_VERSION_NUM >= 170000 dshash_memcpy, +#endif + /* .tranche_id = */ 0, // Set later because this is determined dynamically. }; struct SharedData {