Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 372623 - After emerging postgresql-server-8.4.8-r1, emerge --config failed
Summary: After emerging postgresql-server-8.4.8-r1, emerge --config failed
Status: RESOLVED WORKSFORME
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: x86 Linux
: Normal normal
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-22 22:05 UTC by DO van Thuan
Modified: 2011-07-05 06:19 UTC (History)
0 users

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 DO van Thuan 2011-06-22 22:05:35 UTC
There is no postgresql on the machine, the installation started with
  #emerge postgresql-server -av
with /etc/portage/package.mask
  ...
  >=dev-db/postgresql-docs-8.5
  >=dev-db/postgresql-base-8.5
  >=dev-db/postgresql-server-8.5

And after editing /etc/conf.d/postgresql-8.4 with the proper locale
 # emerge --config =dev-db/postgresql-server-8.4.8-r1


Configuring pkg...

 * You can modify the paths and options passed to initdb by editing:
 *     /etc/conf.d/postgresql-8.4
 *
 * Information on options that can be passed to initdb are found at:
 *     http://www.postgresql.org/docs/8.4/static/creating-cluster.html
 *     http://www.postgresql.org/docs/8.4/static/app-initdb.html
 *
 * PG_INITDB_OPTS is currently set to:
 *     --locale=en_US.utf8
 *
 * Configuration files will be installed to:
 *     /etc/postgresql-8.4/
 *
 * The database cluster will be created in:
 *     /var/lib/postgresql/8.4/data
 *
 * Are you ready to continue? (y/n)
y
 * Checking system parameters...
 * Checking whether your system supports at least 128 connections...
 * Passed.
 * Creating the data directory ...
 * Initializing the database ...
mv: cannot stat `/var/lib/postgresql/8.4/data/*.conf': No such file or directory
 * The autovacuum function, which was in contrib, has been moved to the main
 * PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled by
 * default. You can disable it in the cluster's:
 *     /etc/postgresql-8.4/postgresql.conf
 *
 * The PostgreSQL server, by default, will log events to:
 *     /var/lib/postgresql/8.4/data/postmaster.log
 *
 * You should use the '/etc/init.d/postgresql-8.4' script to run PostgreSQL
 * instead of 'pg_ctl'.

I have tried several time with "unmerge and emerge first postgresql-base, eselect postgresql set 8.4, eselect postgresql update, revdep-rebuild and emerge postgresql-server and then emerge --config" but it didn't help much.
I have also tried without the mask and got the same error with the latest version 9.0.4 ebuild.

Any idea? I am desperately in need of setting up a postgresql server. Any way to do that without the ebuild?


Reproducible: Always

Steps to Reproduce:
1. emerge postgresql-server
2. edit /etc/conf.d/postgresql-8.4
3. emerge --config =dev-db/postgresql-server-8.4.8-r1
Actual Results:  
 * Initializing the database ...
mv: cannot stat `/var/lib/postgresql/8.4/data/*.conf': No such file or directory

And of course,
  #/etc/init.d/postgresql-8.4 start
will fail to start.

Expected Results:  
postgresql will be configured.

#emerge --info
Portage 2.1.9.42 (hardened/linux/x86, gcc-4.4.5-vanilla, libc-0-r0, 2.6.29-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.29-gentoo-r5-i686-Intel-R-_Xeon-TM-_CPU_3.06GHz-with-gentoo-2.0.2
Timestamp of tree: Wed, 22 Jun 2011 12:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/ccache:     2.4-r9
dev-util/cmake:      2.8.4-r1
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.2-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.82
sys-kernel/linux-headers: 2.6.36.1
sys-libs/glibc:      2.12.2
virtual/os-headers:  0
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA sun-bcla-java-vm dlj-1.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-2.2/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp.linux.ee/pub/gentoo/distfiles/ http://ds.thn.htu.se/linux/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl apache2 berkdb bzip2 cli cracklib crypt cxx dri gdbm gpm hardened iconv java modules mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl pic pppd python readline session ssl symlink sysfs tcpd urandom x86 xml zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="access alias auth auth_anon auth_basic auth_dbm auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_owner authz_user authz_host file-cache echo charset-lite cache disk-cache mem-cache ext-filter case_filter case-filter-in deflate mime-magic cern-meta expires headers usertrack unique-id proxy proxy-connect proxy-ftp proxy-http proxy_http info include cgi cgid dav dav_fs dav_lock vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir so filter unique_id vhost_alias" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 DO van Thuan 2011-06-23 08:21:16 UTC
When doing according to this advice
 * Make sure the postgres user in /etc/passwd has an account setup with /bin/bash as the shell
from "http://www.gentoo.org/doc/en/postgres-howto.xml,"
everything works fine!
Shall we say "Resolved" now? Please advise!
Comment 2 Aaron W. Swenson gentoo-dev 2011-06-23 11:46:37 UTC
(In reply to comment #1)
> When doing according to this advice
>  * Make sure the postgres user in /etc/passwd has an account setup with
> /bin/bash as the shell
> from "http://www.gentoo.org/doc/en/postgres-howto.xml,"
> everything works fine!
> Shall we say "Resolved" now? Please advise!

No, we shan't. I'll have to see if I can reproduce this issue.

Which steps did you perform from that document to make it work?
Comment 3 DO van Thuan 2011-06-23 12:36:26 UTC
I did the following:
 - make the account postgres to have /bin/bash as the shell
 - emerge postgresql-base
 - revdep-rebuild
 - eselect postgresql list (8.4 is the default slot)
 - eselect postgresql update
 - emerge postgresql-server
 - edit /etc/conf.d/postgresql-8.4
 - emerge --config =dev-db/postgresql-server-8.4.8-r1
And postgresql was installed.
Comment 4 Aaron W. Swenson gentoo-dev 2011-07-05 00:12:38 UTC
I haven't been able to reproduce this. It always just works for me.

The ebuilds already performs those steps, excluding revdep-rebuild.
Comment 5 DO van Thuan 2011-07-05 06:19:02 UTC
Thank you, Aaron, very much indeed! I wonder that it could be because:
 1. My server does not have Postgresql installed before or
 2. One of the earlier e-builds of 8.4.x created user postgres with shell=false