pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/48505: PostgreSQL's contrib additions are not packaged
>Number: 48505
>Category: pkg
>Synopsis: The server packages for PostgreSQL in pkgsrc do not install
>contrib code
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 07 18:50:00 +0000 2014
>Originator: Pierre Pronchery
>Release: NetBSD 6.1_STABLE/pkgsrc 2013Q1 (from EdgeBSD)
>Organization:
>Environment:
System: NetBSD 6.1_STABLE NetBSD 6.1_STABLE/pkgsrc 2013Q1 (from EdgeBSD)
Architecture: x86_64
Machine: amd64
>Description:
PostgreSQL proposes a number of non-essential extensions and additions within
the "contrib" folder of its redistributable source archive. While not absolutely
necessary, they can be welcome additions in a number of cases, but they are not
packaged as part of pkgsrc. Using the pg_trgm extension from this directory
myself, I think it would be great to have a way to package them.
I can imagine at least three ways to implement it:
1. Simply build and install all of the contrib/ directory inconditionally;
2. Add a "contrib" option to the packages (and then handle PLIST etc)
3. Add a databases/postgresqlXY-contrib package for each version
I believe #3 is the most elegant, and it seems that packages from Joyent doing
exactly this are available already, see:
https://github.com/joyent/pkgsrc-joyent/tree/master/postgresql91-contrib
>How-To-Repeat:
# createdb -U pgsql pgsql
# psql -U pgsql pgsql
pgsql=# CREATE EXTENSION pg_trgm;
ERROR: could not open extension control file
"/usr/pkg/share/postgresql/extension/pg_trgm.control": No such file or directory
>Fix:
A quick and dirty work-around for pg_trgm:
diff --git a/databases/postgresql91-server/Makefile
b/databases/postgresql91-server/Makefile
index fb8ca0e..8b02e18 100644
--- a/databases/postgresql91-server/Makefile
+++ b/databases/postgresql91-server/Makefile
@@ -16,6 +16,7 @@ INSTALL_DIRS+= src/backend/utils/mb/conversion_procs
INSTALL_DIRS+= src/backend/snowball
INSTALL_DIRS+= src/timezone
INSTALL_DIRS+= src/pl
+INSTALL_DIRS+= contrib/pg_trgm
BUILD_DIRS= src/port
BUILD_DIRS+= ${INSTALL_DIRS}
diff --git a/databases/postgresql91-server/PLIST
b/databases/postgresql91-server/PLIST
index 1237920..04dfa41 100644
--- a/databases/postgresql91-server/PLIST
+++ b/databases/postgresql91-server/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.6.2.1 2013/04/09 10:33:32 tron Exp $
+@comment $NetBSD$
bin/postgres
bin/postmaster
lib/postgresql/ascii_and_mic.so
@@ -12,6 +12,7 @@ lib/postgresql/euc_tw_and_big5.so
lib/postgresql/latin2_and_win1250.so
lib/postgresql/latin_and_mic.so
lib/postgresql/libpqwalreceiver.so
+lib/postgresql/pg_trgm.so
lib/postgresql/plpgsql.so
lib/postgresql/utf8_and_ascii.so
lib/postgresql/utf8_and_big5.so
@@ -56,6 +57,9 @@ share/locale/zh_CN/LC_MESSAGES/postgres-9.1.mo
share/locale/zh_TW/LC_MESSAGES/plpgsql-9.1.mo
share/locale/zh_TW/LC_MESSAGES/postgres-9.1.mo
share/postgresql/conversion_create.sql
+share/postgresql/extension/pg_trgm--1.0.sql
+share/postgresql/extension/pg_trgm--unpackaged--1.0.sql
+share/postgresql/extension/pg_trgm.control
share/postgresql/extension/plpgsql--1.0.sql
share/postgresql/extension/plpgsql--unpackaged--1.0.sql
share/postgresql/extension/plpgsql.control
Home |
Main Index |
Thread Index |
Old Index