Bug 217874 - databases/postgresql96-client: install pg_regress utility to fix running regression tests for pg extensions
Summary: databases/postgresql96-client: install pg_regress utility to fix running regr...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Palle Girgensohn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-17 18:15 UTC by Dmitry Marakasov
Modified: 2017-07-17 11:16 UTC (History)
1 user (show)

See Also:


Attachments
Patch (1.51 KB, patch)
2017-03-17 18:15 UTC, Dmitry Marakasov
no flags Details | Diff
Patch for all postgresql versions (5.18 KB, patch)
2017-06-29 15:42 UTC, Dmitry Marakasov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Marakasov freebsd_committer freebsd_triage 2017-03-17 18:15:26 UTC
Created attachment 180909 [details]
Patch

So, I'm developing a postgresql extension. It builds and installs fine:

% gmake install
/bin/mkdir -p '/usr/local/lib/postgresql'
/bin/mkdir -p '/usr/local/share/postgresql/extension'
/bin/mkdir -p '/usr/local/share/postgresql/extension'
/usr/bin/install -c -m 755  libversion.so '/usr/local/lib/postgresql/libversion.so'
/usr/bin/install -c -m 644 .//libversion.control '/usr/local/share/postgresql/extension/'
/usr/bin/install -c -m 644 .//libversion--1.0.0.sql  '/usr/local/share/postgresql/extension/'

however running a test fails:

% sudo gmake installcheck
/usr/local/lib/postgresql/pgxs/src/makefiles/../../src/test/regress/pg_regress --inputdir=./ --bindir='/usr/local/bin'    --dbname=contrib_regression libversion_test
gmake: /usr/local/lib/postgresql/pgxs/src/makefiles/../../src/test/regress/pg_regress: Command not found
gmake: *** [/usr/local/lib/postgresql/pgxs/src/makefiles/pgxs.mk:272: installcheck] Error 127

because pg_regress binary is not installed. I think we need to install it. The attached patch fixes it.
Comment 1 Dmitry Marakasov freebsd_committer freebsd_triage 2017-03-17 18:17:12 UTC
Note that the same fix is probably needed for other pgsql versions in the ports.
Comment 2 Dmitry Marakasov freebsd_committer freebsd_triage 2017-06-09 18:44:30 UTC
ping
Comment 3 Palle Girgensohn freebsd_committer freebsd_triage 2017-06-11 10:04:59 UTC
Shouln't it be a part of the postgresqlNN-server installation? It cannot really be used without the server, can it?
Comment 4 Dmitry Marakasov freebsd_committer freebsd_triage 2017-06-16 09:13:04 UTC
I don't think anything may ever depend on server as it may always be running on a different machine. Also IMO it belongs to the port which installs .mk files, which is client.
Comment 5 Dmitry Marakasov freebsd_committer freebsd_triage 2017-06-28 12:49:06 UTC
ping
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-06-29 12:04:45 UTC
A commit references this bug:

Author: amdmi3
Date: Thu Jun 29 12:04:18 UTC 2017
New revision: 444644
URL: https://svnweb.freebsd.org/changeset/ports/444644

Log:
  - Include pg_regress to postgresql96-client, to allow running regression tests for postgresql extensions

  PR:		217874
  Approved by:	maintainer timeout (3 months)

Changes:
  head/databases/postgresql96-client/Makefile
  head/databases/postgresql96-server/pkg-plist-client
Comment 7 Palle Girgensohn freebsd_committer freebsd_triage 2017-06-29 12:06:41 UTC
(In reply to Dmitry Marakasov from comment #4)
Isn't the server port required to build extensions?
Comment 8 Dmitry Marakasov freebsd_committer freebsd_triage 2017-06-29 15:09:42 UTC
(In reply to Palle Girgensohn from comment #7)
> (In reply to Dmitry Marakasov from comment #4)
> Isn't the server port required to build extensions?

No, the client port contains everything required.

I'm not closing this because I'm working on a similar patch for all remaining postgresql versions.
Comment 9 Dmitry Marakasov freebsd_committer freebsd_triage 2017-06-29 15:42:33 UTC
Created attachment 183914 [details]
Patch for all postgresql versions

Patch enableing pg_regress for all pgsql versions. Also adds missing pkg-plist entry for postgresql96-server.
Comment 10 commit-hook freebsd_committer freebsd_triage 2017-07-17 11:14:48 UTC
A commit references this bug:

Author: amdmi3
Date: Mon Jul 17 11:14:10 UTC 2017
New revision: 446064
URL: https://svnweb.freebsd.org/changeset/ports/446064

Log:
  - Add missing file to plist

  PR:		217874
  Approved by:	maintainer timeout (postgres, 2 weeks)

Changes:
  head/databases/postgresql96-server/Makefile
  head/databases/postgresql96-server/pkg-plist-server
Comment 11 commit-hook freebsd_committer freebsd_triage 2017-07-17 11:16:52 UTC
A commit references this bug:

Author: amdmi3
Date: Mon Jul 17 11:15:51 UTC 2017
New revision: 446065
URL: https://svnweb.freebsd.org/changeset/ports/446065

Log:
  - Include pg_regress to all postgresql*-client ports, to allow running regression tests for postgresql extensions

  PR:		217874
  Approved by:	maintainer timeout (pgsql, 4 months)

Changes:
  head/databases/postgresql92-client/Makefile
  head/databases/postgresql92-server/pkg-plist-client
  head/databases/postgresql93-client/Makefile
  head/databases/postgresql93-server/pkg-plist-client
  head/databases/postgresql94-client/Makefile
  head/databases/postgresql94-server/pkg-plist-client
  head/databases/postgresql95-client/Makefile
  head/databases/postgresql95-server/pkg-plist-client