Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 54082 - app-admin/logrotate: broken ebuild dependency: needs mailx but has no dependency for it
Summary: app-admin/logrotate: broken ebuild dependency: needs mailx but has no depende...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-16 06:20 UTC by Gregor Kopka
Modified: 2004-06-17 18:49 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 Gregor Kopka 2004-06-16 06:20:53 UTC
While setting up a new server (moving from debian to get a smaller footprint) i found after some hours of searching that logrotate needs mailx so it can call '/bin/mail -s' (which is not supported by the default exim installed as /bin/mail) to mail the logfiles while rotating.

Emerging the system from scratch i saw no use of emerging mailx (because there won't be any local users on a pure SMTP/POP3 box) so i ran into this.

Should logrotate not have an dependency on mailx so that emerge will not leave a broken system for cases like that?



Reproducible: Always
Steps to Reproduce:
1. install minimal base system including exim as MTA (which is default)
2. 'emerge logrotate'
3. Setup logrotate to send rotated logs by mail
4. 'logrotate -f' or trigger via cron
5. Logs rotate but not mailed, error message send to postmaster, logfile lost
6. SOLUTION: emerge mailx fixes the problem
Actual Results:  
Mail to Postmaster stating:

Subject: Cron <root@netgate> test -x /usr/sbin/run-crons && /usr/sbin/run-crons 

exim abandoned: unknown, malformed, or incomplete option -s
Failed to mail /var/log/exim/exim_main.log.8.gz to [xxx]!
exim abandoned: unknown, malformed, or incomplete option -s
Failed to mail /var/log/exim/exim_reject.log.8.gz to [xxx]!

... and the coresponding logs got lost because they were deleted by logrotate
(as requested they should be mailed first!).

*: [xxx] edited the email adress away

Expected Results:  
logrotate should depend on mailx so the solution to this problem will
automatically emerge ;-)


Portage 2.0.50-r8 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3.20040420-r0,
2.4.25-gentoo-r2)
=================================================================
System uname: 2.4.25-gentoo-r2 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r3
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="ftp://ftp.easynet.nl/mirror/gentoo/ http://gentoo.inode.at/
ftp://gentoo.inode.at/source/ http://gd.tuwien.ac.at/opsys/linux/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apache2 apm arts avi berkdb chroot crypt cups curl encode exiscan-acl flash
foomaticdb gd gif gtk2 imlib innodb jpeg libg++ libwww mad maildir mcal memlimit
mikmod mysql ncurses nls oss pdflib perl png python readline sdl slang spell ssl
threads tiff tls truetype x86 xml2 xv zlib"
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-06-17 18:49:28 UTC
not everybody wants to be emailed by their logrotate, so we shouldn't require them to install mailx.

if you read the logrotate postinst message, it tells you to emerge mailx if you want that functionality, and the same thing is discussed in the ChangeLog.