Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 214342 - mail-mta/postfix-2.5.1 - keepdir /var/lib/postfix results in a warning on postfix check
Summary: mail-mta/postfix-2.5.1 - keepdir /var/lib/postfix results in a warning on pos...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Lowest enhancement
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-23 06:07 UTC by Eray Aslan
Modified: 2008-06-10 23:36 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 Eray Aslan gentoo-dev 2008-03-23 06:07:29 UTC
postfix 2.5.0 introduced $data_directory.  2.5.1 ebuild does:
[...]
    dodir /var/lib/postfix
    keepdir /var/lib/postfix
    fowners postfix:postfix /var/lib/postfix
    fperms 0750 /var/lib/postfix
[...]
which results in a root owned keepdir file which in turn results in:

# postfix check
postfix/postfix-script: warning: not owned by postfix: /var/lib/postfix/./.keep_mail-mta_postfix-0

One way to get rid of the warning would be to add:

fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT} 

after the keepdir /var/lib/postifx command.

Btw, do we need to keepdir() this directory (just asking) as it contains:
"...files that maintained by single-writer
Postfix process: the address verification cache that is maintained
by the verify service; the pseudo-random pool and TLS session keys
that are maintained by the tlsmgr service; and other cache files
that are maintained by the proxywrite service."

Reproducible: Always



Expected Results:  
no warnings after upgrade/installation

# emerge --info
Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23-gentoo-r6 i686)
=================================================================
System uname: 2.6.23-gentoo-r6 i686 Pentium III (Coppermine)
Timestamp of tree: Sun, 23 Mar 2008 05:17:01 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r9
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.ntua.gr/pub/linux/gentoo/ ftp://ftp.linux.org.tr/pub/mirrors/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl apache2 berkdb bzip2 cjk cli cracklib crypt dri fortran gdbm gpm iconv imap isdnlog ldap libwww maildir midi mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection sasl session spl ssl tcpd unicode usb x86 xorg 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 mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-03-23 08:31:01 UTC
(In reply to comment #0)
> Btw, do we need to keepdir() this directory (just asking) as it contains:

How's that relevant here? The keepdir is there so that the directory doesn't vanish on re-emerge if it's empty.

Comment 2 Eray Aslan gentoo-dev 2008-03-23 10:52:23 UTC
(In reply to comment #1)
> How's that relevant here? The keepdir is there so that the directory doesn't
> vanish on re-emerge if it's empty.

It is not.  Disregard the last paragraph please.
Comment 3 tanstaafl@libertytrek.org 2008-03-23 21:34:40 UTC
So... I'm confused...

What's the correct fix? It sounds like this file being owned by root is by design... so is the solution simply that there is nothing to fix, but simply to understand the reason for the warning?

Thanks...
Comment 4 Eray Aslan gentoo-dev 2008-03-24 04:48:08 UTC
(In reply to comment #3)
> What's the correct fix?

AFAIK, alternatives are:

1. Do nothing.  Let the postfix log a warning: I do not like unneccesary warnings in my log files.  It messes up reporting.  I also do not like root owned files in a directory where there should be none.
2. Patch postfix not to log a warning: Maintenance nightmare.  Also does not address "root owned file in a directory..." stuff.
3. Have the keep file owned by postfix:postfix:  This is the correct solution imho.  Adding fowners postfix:postfix /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT} to the ebuild achieves this.
Comment 5 Tobias Scherbaum (RETIRED) gentoo-dev 2008-06-09 19:47:25 UTC
(In reply to comment #4)
> 3. Have the keep file owned by postfix:postfix:  This is the correct solution
> imho.  Adding fowners postfix:postfix
> /var/lib/postfix/.keep_${CATEGORY}_${PN}-${SLOT} to the ebuild achieves this.

Agreed, fixed this in 2.5.0, 2.5.1 and 2.5.2.
Comment 6 Dennis Schridde 2008-06-10 23:36:35 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > What's the correct fix?
> 
> AFAIK, alternatives are:
> 
> [...]
4. Extend Portage to generate keepdir files as a specific user.
I.e. keepdir /the/dir user group