Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 79142 - /etc/init.d/postgresql start fails with clean build of PostgreSQL 8.0.0
Summary: /etc/init.d/postgresql start fails with clean build of PostgreSQL 8.0.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-22 14:35 UTC by Jason Fabritz
Modified: 2007-09-22 23:24 UTC (History)
2 users (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 Jason Fabritz 2005-01-22 14:35:00 UTC
I think the 8.0.0 ebuild (for a fresh postgresql installation) sets the newly created postgres account shell to /bin/false in the passwd file and the /etc/init.d/postgresql startup script does not like that.



Reproducible: Didn't try
Steps to Reproduce:
1. emerged a new build of PostgreSQL 8.0.0 (fist time install of any version):

ACCEPT_KEYWORDS="~x86" emerge postgresql

2. Followed the advice on http://gentoo-wiki.com/HOWTO_Configure_Postgresql except I made a link from /var/lib/postgresql to /home/postgres/ (so I could have the data files on my raid) and used 8.0.0 ebuild files instead.  

3. Noticed the ebuild called initdb so skipped that line in the wiki docs.

4. could not su to postgre, the shell was set as /bin/false in the /etc/passwd file.

5. tried /etc/init.d/postgresql start


Actual Results:  
the startup script gave an error and said check the
/var/lib/postgresql/postgresql.log file, but that file did not exist.



Expected Results:  
Expected successful startup of postgresql.

I edited the /etc/passwd file to set a /bin/bash shell and tried
/etc/init.d/postgresql start again.  This time it worked.

Portage 2.0.51-r14 (default-linux/x86/2004.0, gcc-3.3.5,
glibc-2.3.4.20040808-r1, 2.4.23 i686)
=================================================================
System uname: 2.4.23 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.2.3-r5,dev-lang/python-2.3.4 [2.3.4 (#1,
Oct 27 2004, 07:02:12)]
dev-lang/python:     2.2.3-r5, 2.3.4
sys-devel/autoconf:  2.59-r5
sys-devel/automake:  1.8.5-r1
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.4.19-r1, 2.4.21-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 3dnow aalib apache2 apm berkdb bitmap-fonts cdr crypt cups doc dvd
encode f77 font-server foomaticdb fortran gd gdbm ggi gif gpm gtk gtk2 imlib
ipv6 java jpeg junit libg++ libwww mad mikmod mmx mysql ncurses nls oggvorbis
oss pam pdflib perl png postgres python readline samba sdl slang slp spell ssl
svga tcpd tiff truetype truetype-fonts type1-fonts usb xml xml2 xmms zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Masatomo Nakano (RETIRED) gentoo-dev 2005-01-23 12:22:51 UTC
first, I didn't know the wiki page.

These are procedures I suppose about set up PostgreSQL using portage/ebuild.

1. emerge postgresql
2. ebuild /var/db/pkg/dev-db/postgresql-8.0.0/postgresql-8.0.0.ebuild config
3. /etc/init.d/postgresql start
(below is optional)
4. su postgres
5. createuser <username>
6. su username
7. createdb <dbname> (if you need)
8. psql <dbname> (or using other clients)

we might need to add more messages after emerging.
Comment 2 Kim Pedersen 2005-10-25 01:55:37 UTC
8.0.3 works if you pay attention to the emerge messages. In particular you have
to run:
emerge --config =postgresql-8.0.3
after after the emerge. Then it works with no problems.
I have corrected http://gentoo-wiki.com/HOWTO_Configure_Postgresql to reflect this.
This is not a bug in my opinion.
Comment 3 Tiziano Müller (RETIRED) gentoo-dev 2006-11-11 03:10:36 UTC
Well, in the new versions of postgresql, the shell for the postgres-user is set to /bin/bash. It should therefore be possible to do "su postgres".