Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 443114 - dev-db/postgresql-server[pam]: postgresql pam config gets removed after unmerging any of installed slots
Summary: dev-db/postgresql-server[pam]: postgresql pam config gets removed after unmer...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-14 15:07 UTC by Alexander Tsoy
Modified: 2013-02-12 16:39 UTC (History)
0 users

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


Attachments
postgresql-server-9.2.3.ebuild.patch (postgresql-server-9.2.3.ebuild.patch,492 bytes, patch)
2013-02-12 15:47 UTC, Alexander Tsoy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2012-11-14 15:07:54 UTC
postgresql pam.d config is owned by all installed postgresql-server slots. If you unmerge one of the slots then config will be deleted.

Reproducible: Always

Steps to Reproduce:
1. Install two slots, for example 9.1 and 9.2
2. Remove 9.1
3. Check /etc/pam.d/postgresql file

Actual Results:  
$ equery f postgresql-server | grep 'pam\.d'                                                                        
/etc/pam.d
/etc/pam.d/postgresql

$ ls -l /etc/pam.d/postgresql
ls: cannot access /etc/pam.d/postgresql: No such file or directory



$ sudo emerge --info 
Пароль: 
Portage 2.1.11.31 (hardened/linux/amd64, gcc-4.6.3, glibc-2.15-r3, 3.5.4-hardened-r1 x86_64)
=================================================================
System uname: Linux-3.5.4-hardened-r1-x86_64-QEMU_Virtual_CPU_version_1.0-with-gentoo-2.1
Timestamp of tree: Wed, 14 Nov 2012 00:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.5
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.4-r2 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-local
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/termi
nfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://de-mirror.org/gentoo/ ftp://de-mirror.org/gentoo/ "
LANG="ru_RU.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="xz"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local"
SYNC=""
USE="acl aio amd64 bash-completion berkdb bzip2 caps cli cracklib crypt cups cxx device-mapper dri gdbm gpm hardened iconv icu idn ipv6 justify logrotate ma
ildir mmx modules mudflap multilib mysql ncurses nls nptl openmp pam pax_kernel pcre perl postgres pppd python readline sasl session sse sse2 ssl tcpd tls u
nicode urandom vim-syntax xattr zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-i
ntel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug fil
e hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socach
e_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_ow
ner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config 
logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan
 sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="lvm" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz 
cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en ru" PHP_TARGETS="php5-3"
 PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage si
s tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sys
rq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Aaron W. Swenson gentoo-dev 2013-02-08 18:55:58 UTC
*postgresql-base-9.2.3 (08 Feb 2013)
*postgresql-base-9.1.8 (08 Feb 2013)
*postgresql-base-9.0.12 (08 Feb 2013)
*postgresql-base-8.4.16 (08 Feb 2013)
*postgresql-base-8.3.23 (08 Feb 2013)

  08 Feb 2013; Aaron W. Swenson <titanofold@gentoo.org>
  +postgresql-base-8.3.23.ebuild, +postgresql-base-8.4.16.ebuild,
  +postgresql-base-9.0.12.ebuild, +postgresql-base-9.1.8.ebuild,
  +postgresql-base-9.2.3.ebuild, postgresql-base-9999.ebuild:
  Append ${SLOT} to PAM service name; each slot now has its own PAM service
  file. (Bug 443113) Security bump. (Bug 456080)

*postgresql-server-9.2.3 (08 Feb 2013)
*postgresql-server-9.1.8 (08 Feb 2013)
*postgresql-server-9.0.12 (08 Feb 2013)
*postgresql-server-8.4.16 (08 Feb 2013)
*postgresql-server-8.3.23 (08 Feb 2013)

  08 Feb 2013; Aaron W. Swenson <titanofold@gentoo.org>
  +postgresql-server-8.3.23.ebuild, +postgresql-server-8.4.16.ebuild,
  +postgresql-server-9.0.12.ebuild, +postgresql-server-9.1.8.ebuild,
  +postgresql-server-9.2.3.ebuild, postgresql-server-9999.ebuild:
  Added kerberos USE flag. (Bug 427948) Use python-single-r1.eclass to build
  PL/Python against the Python of the users choosing. (Bug 427954) 'use'
  instead of 'need' logger in /etc/init.d/postgresql-${SLOT}. (Bug 435280)
  Default to sane character encoding default with --encoding=UTF-8 in
  /etc/conf.d/postgresql-${SLOT}. (Bug 440258) Append ${SLOT} to PAM service
  name; each slot now has its own PAM service file. (Bug 443113) Security
  bump. (Bug 456080)
Comment 2 Kevin Bryan 2013-02-12 15:23:34 UTC
Postgres doesn't seem to open the versioned pam file, as seen by a failure to login traced with strace:

[pid 19081] open("/etc/pam.d/postgresql", O_RDONLY) = -1 ENOENT (No such file or directory)

I also tried running "eselect postgresql reset", however that did not create a symlink from /etc/pam.d/postgresql to /etc/pam.d/postgresql-9.1, as I would expect.  Creating the symlink myself fixed the problem.
Comment 3 Alexander Tsoy 2013-02-12 15:47:20 UTC
Created attachment 338704 [details, diff]
postgresql-server-9.2.3.ebuild.patch

This should should solve this issue.
Comment 4 Alexander Tsoy 2013-02-12 16:39:00 UTC
I've opened a new bug report for this issue.
Bug 456964