Maverick: gforge-db-postgresql does not install

Bug #660485 reported by Torsten Spindler
This bug report is a duplicate of:  Bug #869986: Fusionforge fails-to-install cleanup. Edit Remove
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gforge (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: gforge

When trying to install gforge-db-postgresql it seems to want to call the wrong init script for a restart of postgresql:

...
Creating /etc/gforge/httpd.conf
Creating /etc/gforge/httpd.secrets
Creating /etc/gforge/local.inc
Creating other includes
Replacing config file /etc/postgresql/8.4/main/pg_hba.conf with new version
invoke-rc.d: unknown initscript, /etc/init.d/postgresql-8.4 not found.
dpkg: error processing gforge-db-postgresql (--configure):
 subprocess installed post-installation script returned error exit status 100
Errors were encountered while processing:
 gforge-db-postgresql
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Torsten Spindler (tspindler) wrote :

Changing this line in db-postgresql.postinst.dsfh-in from pg_name to postgresql will make gforge-db-postgresql installable:

 # pg_name=postgresql-$pg_version
 invoke-rc.d postgresql reload

Revision history for this message
PaulN (paulne) wrote :

For those as confused as me with gforge-db-postgresql install issues, the file in question is:

/var/lib/dpkg/info/gforge-db-postgresql.postinst

search for pg_name

More specifically open a terminal and go:

suodo gedit /var/lib/dpkg/info/gforge-db-postgresql.postinst

or your favourite editor

around line 101 you should see:

 # Make sure the database accepts connections from these new users
 pg_name=postgresql-$pg_version
 invoke-rc.d ${pg_name} reload

change this to:

 # Make sure the database accepts connections from these new users
 #pg_name=postgresql-$pg_version
 #invoke-rc.d ${pg_name} reload
 invoke-rc.d postgresql reload

and save the file

then re-install the package: gforge-db-postgresql
using your favourite method. For example:

sudo apt-get install gforge-db-postgresql

May it work for you,

Paul N

Changed in gforge (Ubuntu):
status: New → Confirmed
Revision history for this message
aaron (aaron-zareason) wrote :

Just to clarify, it sounds like we have to try to install the package, let it fail, edit the script, then try to reinstall it again?

Has this actually been *fixed* by anyone for more recent versions of ubuntu?

Revision history for this message
aaron (aaron-zareason) wrote :

Doesn't work, by the way. After editing the file, and trying to reinstall, I get this error: (have to enter by hand, installing on a server so I've no cut+paste)

Setting up gforge-db-postgresql (some version number, blah blah blah)
Calculating defaults
Reading defaults from /etc/gforge/gforge.conf
Creating /etc/gforge/gforge.conf
SSL Disabled
Creating /etc/gforge/httpd.conf
Creating /etc/gforge/httpd.secrets
Creating /etc/gforge/local.inc
Creating other includes
 * Reloading Postgresql 8.4 database server
Cannot create Postgresql 8.4 database ... This shouldn't have happened
Maybe a problem in your Postgresql configuration?
Please report a bug to the debian bug tracking system
Please include the following output:
CREATE DATABASE's STDOUT:
SET
CREATE DATABASE's STDERR:
ERROR: encoding UTF8 does not match locale en_US
DETAIL: The chosen LC_CTYPE setting requires encoding LATIN1
dpkg: error processing gforge-db-postgresql (--configure):
 subprocess installed post-installation script returned error exit status 1
 gforge-db-postgresql
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is on a system I installed clean minutes ago, the first package I've tried to install.

Why is the database set to LATIN1 by default? Why doesn't it use my systems UTF8? Why doesn't the script do a little detection or some prevention of a complete failure for some language setting? I guess this is a different bug, but I thought I'd follow up to the previous bug as trying to fix it just causes this problem on any of our systems so seems clearly related to this bug (post install script).

Revision history for this message
aaron (aaron-zareason) wrote :

Oh, also, don't forget to also edit:

/var/lib/dpkg/info/gforge-db-postgresql.prerm

 and likewise change the line:

 pg_name=postgresql-$pg_version
 invoke-rc.d ${pg_name} reload

change this to:

 #pg_name=postgresql-$pg_version
 #invoke-rc.d ${pg_name} reload
 invoke-rc.d postgresql reload

otherwise you wont be able to uninstall it either!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.