From 521d6a46222942990e7c0894a0d9a9edba1cbc07 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Tue, 29 Apr 2025 15:02:02 -0400 Subject: [PATCH] Remove deprecated directives and prefix Also start testing on PostgreSQL 18 and document `make install prefix=` on PostgreSQL 18. Use the `github.ref_name` for the release name. --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 2 +- Changes | 8 ++++++++ Makefile | 1 - README.md | 13 +++++++++++++ semver.control | 4 +--- 6 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2108a1d..84d96e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: build: strategy: matrix: - pg: [17, 16, 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4, 9.3, 9.2] + pg: [18, 17, 16, 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4, 9.3, 9.2] name: 🐘 PostgreSQL ${{ matrix.pg }} runs-on: ubuntu-latest container: pgxn/pgxn-tools diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b1eef8..8f33baf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: - name: Create GitHub Release uses: softprops/action-gh-release@v2 with: - name: "Release ${{ github.ref }}" + name: "Release ${{ github.ref_name }}" body_path: latest-changes.md files: ${{ steps.bundle.outputs.bundle }} if: matrix.toolchain == 'stable' && startsWith( github.ref, 'refs/tags/v' ) diff --git a/Changes b/Changes index 332def9..a02571f 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,13 @@ Revision history for PostgreSQL extension semver. +0.40.1 + - Removed the `directory` and `MODULEDIR` directives that installed + extension files in a subdirectory named "semver", as it's not + necessary, and deprecated by PostgreSQL 18. + - Removed the `$libdir/` prefix from the `module_pathname` directive, + so that the module can be installed and found in any directory listed + in `dynamic_library_path`. + 0.40.0 2024-07-20T20:35:03Z - Updated the installation configuration to install the SQL and documentation files into `semver` subdirectories. diff --git a/Makefile b/Makefile index 8777ed1..9c5a11e 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,6 @@ EXTVERSION = $(shell grep -m 1 '[[:space:]]\{8\}"version":' META.json | \ DISTVERSION = $(shell grep -m 1 '[[:space:]]\{3\}"version":' META.json | \ sed -e 's/[[:space:]]*"version":[[:space:]]*"\([^"]*\)",\{0,1\}/\1/') -MODULEDIR = $(EXTENSION) DATA = $(wildcard sql/*.sql) DOCS = $(wildcard doc/*.mmd) TESTS = $(wildcard test/sql/*.sql) diff --git a/README.md b/README.md index ec543d9..3affa0e 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,17 @@ You need to run the test suite using a super user, such as the default make installcheck PGUSER=postgres +To install the extension in a custom prefix on PostgreSQL 18 or later, pass +the `prefix` argument to `install` (but no other `make` targets): + + make install prefix=/usr/local/extras + +Then ensure that the prefix is included in the following [`postgresql.conf` +parameters]: + + extension_control_path = '/usr/local/extras/postgresql/share:$system' + dynamic_library_path = '/usr/local/extras/postgresql/lib:$libdir' + Once semver is installed, you can add it to a database. If you're running PostgreSQL 9.1.0 or greater, it's a simple as connecting to a database as a super user and running: @@ -100,3 +111,5 @@ not limited to, the implied warranties of merchantability and fitness for a particular purpose. The software provided hereunder is on an "as is" basis, and The pg-semver Maintainers no obligations to provide maintenance, support, updates, enhancements, or modifications. + + [`postgresql.conf` parameters]: https://www.postgresql.org/docs/devel/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-OTHER \ No newline at end of file diff --git a/semver.control b/semver.control index 9f28bef..b26ef23 100644 --- a/semver.control +++ b/semver.control @@ -1,7 +1,5 @@ # semver extension comment = 'Semantic version data type' default_version = '0.40.0' - -directory = 'semver' -module_pathname = '$libdir/semver' +module_pathname = 'semver' relocatable = true