Bug 148715 - [patch] port sysutils/bacula-server small fix for script create_postgresql_database.in
Summary: [patch] port sysutils/bacula-server small fix for script create_postgresql_da...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Olli Hauer
Depends on:
Reported: 2010-07-17 20:40 UTC by Olli Hauer
Modified: 2010-09-07 17:36 UTC (History)
1 user (show)

See Also:

patch-create_postgresql_database.in.txt (777 bytes, patch)
2010-07-17 20:40 UTC, Olli Hauer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olli Hauer 2010-07-17 20:40:06 UTC
The script create_postgresql_database tries to get the installed postgresql version in a wrong way.
Output of the command 'psql -d template1 -c 'select version()' is not always on the first line,
instead ' ... | head -n1 | cut ...' the script should use '| awk '/PostgreSQL/ {print $2}'.

Sample output on my machine:

$ psql -U pgsql -d template1 -c 'select version()'
 PostgreSQL 8.4.4 on i386-portbld-freebsd7.3, compiled by GCC cc (GCC) 4.2.1 20070719  [FreeBSD], 32-bit
(1 row)

With the original command $PSQLVERSION is empty, with the modified command $PSQLVERSION=8.4

A bug report was filed upstream: http://bugs.bacula.org/view.php?id=1609
Comment 1 Edwin Groothuis freebsd_committer 2010-07-17 20:40:15 UTC
Maintainer of sysutils/bacula-server,

Please note that PR ports/148715 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:

Edwin Groothuis via the GNATS Auto Assign Tool
Comment 2 Edwin Groothuis freebsd_committer 2010-07-17 20:40:18 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Dan Langille 2010-07-17 21:44:36 UTC
> A bug report was filed upstream: http://bugs.bacula.org/view.php?id=1609

You get bonus points for that. :)

Dan Langille - http://langille.org/
Comment 4 Dan Langille 2010-07-17 22:35:24 UTC
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2010-07-18 00:34:01 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 6 Wesley Shields freebsd_committer 2010-07-21 20:44:36 UTC
Responsible Changed
From-To: freebsd-ports-bugs->wxs

I'll take it.
Comment 7 Olli Hauer freebsd_committer 2010-08-18 19:22:09 UTC
Responsible Changed
From-To: wxs->ohauer

- take my own PR with approval from wxs (by email)
Comment 8 Olli Hauer freebsd_committer 2010-09-07 17:35:10 UTC
State Changed
From-To: open->closed

- Fix is included in new bacula-5.0.3 version