Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 359991 - dev-db/postgresql-server does not start due to incorrect permissions from copy advice
Summary: dev-db/postgresql-server does not start due to incorrect permissions from cop...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-22 18:15 UTC by Kilburn Abrahams
Modified: 2011-03-27 01:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kilburn Abrahams 2011-03-22 18:15:53 UTC
After upgrade from postgresql 9.0.3 to 9.0.3-r2, start indicates that 3 files need to be copied to /etc/postgresql with commands 

cp /var/lib/postgresql/9.0/data/pg_hba.conf /etc/postgresql/pg_hba.conf
cp /var/lib/postgresql/9.0/data/pg_ident.conf /etc/postgresql/pg_ident.conf
cp /var/lib/postgresql/9.0/data/postgresql.conf /etc/postgresql/postgresql.conf

They should be 

cp -p /var/lib/postgresql/9.0/data/pg_hba.conf /etc/postgresql/pg_hba.conf
cp -p /var/lib/postgresql/9.0/data/pg_ident.conf /etc/postgresql/pg_ident.conf
cp -p /var/lib/postgresql/9.0/data/postgresql.conf /etc/postgresql/postgresql.conf

otherwise postgresql will not start due to permissions


Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-03-22 18:40:38 UTC
Did you run `emerge --config =dev-db/postgresql-server-9.0.3-r2' after the upgrade? I can't find the output you are referring to, so I guess it comes from something that the build system installs, e.g. pg_ctl.
Comment 2 Kilburn Abrahams 2011-03-22 18:59:06 UTC
No I did not run emerge --config =dev-db/postgresql-server-9.0.3-r2. Should I. I thought that was first time use. I just started started postgresql after emerge dev-db/postgresql-server-9.0.3-r2. 

postgresql does not started and indicates to run these commands.
Comment 3 Aaron W. Swenson gentoo-dev 2011-03-22 22:32:49 UTC
No, an 'emerge --config' doesn't need to take place. But you don't have to cp the conf files either.

That message is generated based on the values given for PGDATA and DATA_DIR in the related conf.

This is a valid bug as I should have put that '-p' option in there.
Comment 4 Aaron W. Swenson gentoo-dev 2011-03-27 01:44:32 UTC
Changed cp advice to a mv hint in the initscript.
  27 Mar 2011; Aaron W. Swenson <titanofold@gentoo.org>
  +postgresql-server-8.2.20-r2.ebuild, +postgresql-server-8.3.14-r2.ebuild,
  +postgresql-server-8.4.7-r2.ebuild, +postgresql-server-9.0.3-r3.ebuild,
  +postgresql-server-9.1_alpha4-r1.ebuild:
  Fixes bugs 360031, 360029 and 359991. Removed --disable-threadsafety as
  scarabeus reported an issue related to it.