First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 214122
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Markus Ullmann <jokey@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Costas Cavouracis <cca@freemail.gr>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 214122 depends on: Show dependency tree
Show dependency graph
Bug 214122 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2008-03-21 08:16 0000
The new MailScanner ebuild recently imported in portage, does not link
/etc/MailScanner/spam.assassin.prefs.conf to
/etc/mail/spamassassin/mailscanner.cf when the spamassassin use flag is set.
Unless the user links the file manually, all the settings included in it have
NO effect.
In the ebuild I had in my overlay before this was added in portage, this line
was present in the src_install() section:

        use spamassassin && dosym /etc/MailScanner/spam.assassin.prefs.conf
/etc/mail/spamassassin/mailscanner.cf

which was doing the necessary linking.

Reproducible: Always

Steps to Reproduce:
1. Install MailScanner via the portage ebuild
2. Start the service
3. All settings in /etc/MailScanner/spam.assassin.prefs.con are being ingored

Actual Results:  
MailScanner works, but settings in  /etc/MailScanner/spam.assassin.prefs.con
are igonred

Expected Results:  
The link to /etc/mail/spamassassin/mailscanner.cf should be made, so
spamassasin will take into account the settings. The official MailScanner
installer actually does this, but the portage ebuild does not.

emerge --info output:

Portage 2.1.4.4 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.6.1-r0,
2.6.24-gentoo-r3 i686)
=================================================================
System uname: 2.6.24-gentoo-r3 i686 AMD Athlon(tm) XP 2600+
Timestamp of tree: Fri, 21 Mar 2008 07:00:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.5.1-r5
dev-util/ccache:     2.4-r7
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.5, 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=athlon-xp -O2 -pipe -fomit-frame-pointer -w"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf
/etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/
/etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo
/etc/udev/rules.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -w"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FEATURES="ccache distcc distlocks fixpackages metadata-transfer parallel-fetch
sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.uoi.gr/mirror/OS/gentoo/
ftp://ftp.ntua.gr/pub/linux/gentoo/ http://ftp.ntua.gr/pub/linux/gentoo/
http://ftp.physics.auth.gr/pub/mirrors/gentoo/ http://files.gentoo.org/"
LDFLAGS="-Wl,-O1 -Wl,-s -Wl,--sort-common -Wl,--as-needed -Wl,-z,now"
LINGUAS="en"
MAKEOPTS="-j7"
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.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acpi alsa apache2 asf async audiofile
branding bzip2 cairo caps cdr cli cracklib crypt ctype cups curl dbus dedicated
deprecated divx dri dts dvd dvdnav dvdr dvdread emboss emerald encode exif
expat fam fbcondecor ffmpeg firefox flac foomaticdb fortran gd gdbm gif
glibc-omitfp glitz glut gmedia gmp gnome gpm gstreamer gtk gtk2 gtkhtml guile
hal iconv idn imagemagick imap imlib isdnlog java jpeg kde kdeenablefinal
kdehiddenvisibility lcms libcaca libwww lm_sensors mad magic maildir matroska
mhash midi mikmod mmap mmx mmxext mng motif mozilla moznocompose moznoirc
moznomail mp3 mpeg mpm-prefork msn mudflap mysql ncurses new-login newspr
nforce2 nls no-htdocs no-old-linux nptl nptlonly nsplugin ogg opengl openmp pam
pcre pdf perl php pic png ppds pppd python qt3 qt3support qt4 quicktime rar
readline realmedia reflection regex resolvconf rtc samba sasl sdl session slang
spell spl srt sse ssl suhosin svg swat tcltk tcpd tiff transparency truetype
unicode usb userlocales vcd vda vorbis win32codecs wmp x264 x86 xcomposite
xinerama xml xorg xv xvid xvmc zlib" ALSA_CARDS="emu10k1"
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"
APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="keyboard evdev"
KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001
mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="sis vesa"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS,
PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #1 From Costas Cavouracis 2008-03-21 11:19:20 0000 -------
I also found another bug: the update checkers do not source the right
directory:
In my overlay I have this:

        # update bin files
        sed -i \
                -e "s#msbindir=/opt/MailScanner/bin#msbindir=/usr/sbin#g" \
                -e
"s#config=/opt/MailScanner/etc/MailScanner.conf#config=/etc/MailScanner/MailScanner.conf#g"
\
                ${S}/bin/check_mailscanner

        sed -i -e "s#/opt/MailScanner/etc#/etc/MailScanner#g"
${S}/bin/update_virus_scanners
        sed -i -e "s#/opt/MailScanner/etc#/etc/MailScanner#g"
${S}/bin/update_phishing_sites
        sed -i -e "s#/opt/MailScanner/etc#/etc/MailScanner#g"
${S}/bin/update_bad_phishing_sites
        sed -i -e "s#/etc/sysconfig/MailScanner#/etc/conf.d/mailscanner#g"
${S}/bin/update_spamassassin
        sed -i \
                -e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \
                -e "s#/opt/MailScanner/lib#/usr/lib/MailScanner#g" \
                ${S}/bin/MailScanner

In the official ebuild the section marked "#update bin files" is missing
several entries. This causes this error in my logs:

Mar 21 11:59:27 [update.phishing.sites] Cannot find MailScanner configuration
directory, update failed

------- Comment #2 From John Wilcock 2008-03-25 08:18:02 0000 -------
(In reply to comment #1)
>         sed -i -e "s#/etc/sysconfig/MailScanner#/etc/conf.d/mailscanner#g"
> ${S}/bin/update_spamassassin

Also, the conf file is /etc/conf.d/MailScanner (note the case), and this change
also affects the other update_* files.

------- Comment #3 From Markus Ullmann 2008-03-27 01:33:32 0000 -------
Added to CVS, thanks for the feedback and keep up the good work :)

------- Comment #4 From Costas Cavouracis 2008-03-27 08:43:50 0000 -------
Ufortunately the emerge process fails:

defiant ~ # emerge -u1av mail-filter/MailScanner

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] mail-filter/MailScanner-4.67.6.1-r1 [4.67.6.1] USE="clamav
postfix spamassassin -bitdefender -doc% -exim -f-prot (-sendmail%) (-vlnx%)" 0
kB

Total: 1 package (1 upgrade), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild Manifests...

>>> Emerging (1 of 1) mail-filter/MailScanner-4.67.6.1-r1 to /
 * MailScanner-install-4.67.6-1.tar.gz RMD160 SHA1 SHA256 size ;-) ...         
                                        [ ok ]
 * checking ebuild checksums ;-) ...                                           
                                        [ ok ]
 * checking auxfile checksums ;-) ...                                          
                                        [ ok ]
 * checking miscfile checksums ;-) ...                                         
                                        [ ok ]
 * checking MailScanner-install-4.67.6-1.tar.gz ;-) ...                        
                                        [ ok ]
>>> Unpacking source...
>>> Unpacking MailScanner-install-4.67.6-1.tar.gz to /var/tmp/portage/mail-filter/MailScanner-4.67.6.1-r1/work
>>> Unpacking ./MailScanner-install-4.67.6/perl-tar/MailScanner-4.67.6-1.tar.gz to /var/tmp/portage/mail-filter/MailScanner-4.67.6.1-r1/work
sed: no input files
>>> Source unpacked.
--------------------------- ACCESS VIOLATION SUMMARY
---------------------------
LOG FILE = "/var/log/sandbox/sandbox-6474.log"

open_wr:   /etc/mail/spamassassin/sa-update-keys/.#lk0x80ed900.defiant.6548
open_wr:   /etc/mail/spamassassin/sa-update-keys/.#lk0x8170948.defiant.6548
--------------------------------------------------------------------------------

I suspect some typo error somewhere, but my sed knowledge is not enough.

------- Comment #5 From Costas Cavouracis 2008-03-27 08:53:22 0000 -------
OK, bug found! A diff gave me the answer:

# diff -u MailScanner-4.67.6.1.ebuild MailScanner-4.67.6.1-r1.ebuild
--- MailScanner-4.67.6.1.ebuild 2008-03-20 17:34:14.000000000 +0200
+++ MailScanner-4.67.6.1-r1.ebuild      2008-03-27 03:33:23.000000000 +0200
@@ -1,6 +1,6 @@
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header:
/var/cvsroot/gentoo-x86/mail-filter/MailScanner/MailScanner-4.67.6.1.ebuild,v
1.1 2008/03/20 15:34:14 jokey Exp $
+# $Header:
/var/cvsroot/gentoo-x86/mail-filter/MailScanner/MailScanner-4.67.6.1-r1.ebuild,v
1.1 2008/03/27 01:33:23 jokey Exp $

 inherit eutils versionator

@@ -118,9 +118,14 @@
                -e "s#msbindir=/opt/MailScanner/bin#msbindir=/usr/sbin#g" \
                -e
"s#config=/opt/MailScanner/etc/MailScanner.conf#config=/etc/MailScanner/MailScanner.conf#g"
\
                "${S}/bin/check_mailscanner"
-       sed -i \
+       for each in update_virus_scanners update_phishing_sites
update_bad_phishing_sites ; do
+               sed -i \
                -e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \
-               "${S}/bin/update_virus_scanners"
+               "${S}/bin/${each}"
+       done
+       sed -i \
+               -e "s#/etc/sysconfig/MailScanner#/etc/conf.d/MailScanner#g"
+               ${S}/bin/update_spamassassin
        sed -i \
                -e "s#/opt/MailScanner/etc#/etc/MailScanner#g" \
                -e "s#/opt/MailScanner/lib#/usr/lib/MailScanner#g" \
@@ -273,6 +278,8 @@
        else
                keepdir /var/spool/mqueue.in
        fi
+       use spamassassin && dosym /etc/MailScanner/spam.assassin.prefs.conf
/etc/mail/spamassassin/mailscanner.cf
+
 }

 pkg_postinst() {


Notice the line: ${S}/bin/update_spamassassin
There no quotes! So the ebuild is trying to execute the file!

------- Comment #6 From Costas Cavouracis 2008-03-27 09:07:28 0000 -------
And while I'm at it, can you add this line please:

# update spam.assassin.prefs.conf
sed -i -e "s#YOURDOMAIN-COM#${YOURSITE}#" ${S}/etc/spam.assassin.prefs.conf

This goes after the long sed command that updates the MailScanner.conf file.

------- Comment #7 From Costas Cavouracis 2008-03-27 10:12:11 0000 -------
Oh, I see that the missing quotes error was fixed later, maybe my mirror was
synced to the CVS at the time, just add the line for the
spam.assassin.prefs.conf, its a nice extra automation.

------- Comment #8 From Costas Cavouracis 2008-03-27 15:07:04 0000 -------
OK Markus, mail-filter/MailScanner-4.67.6.1-r2 installs and works just fine as
far as I can tell. I think we should close this bug, if something new comes up,
a new bug will be opened. Thank you!

------- Comment #9 From Markus Ullmann 2008-03-27 15:54:42 0000 -------
Fine, thanks much for the reports :)

I just went on with a standard install so didn't notice it.

Feel free to poke me with more suggestions :)

First Last Prev Next    No search results available      Search page      Enter new bug