Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 64462 - New ebuild for amavisd-new 2.2.0
Summary: New ebuild for amavisd-new 2.2.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords: EBUILD, Inclusion
: 61540 (view as bug list)
Depends on: 45484 52291 65248
Blocks:
  Show dependency tree
 
Reported: 2004-09-17 15:07 UTC by D-Bugger
Modified: 2005-01-19 15:19 UTC (History)
8 users (show)

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


Attachments
the ebuild (amavisd-new-20040906.ebuild,4.23 KB, text/plain)
2004-09-17 15:08 UTC, D-Bugger
Details
some amavisd.conf mods (amavisd-conf.diff,2.29 KB, patch)
2004-09-17 15:09 UTC, D-Bugger
Details | Diff
spamassassin-3.x compat patch (kerf,547 bytes, patch)
2004-09-23 05:37 UTC, kfm
Details | Diff
amavisd-new-2.2.0.ebuild (amavisd-new-2.2.0-r1.ebuild,4.22 KB, text/plain)
2004-11-11 05:18 UTC, Sune Kloppenborg Jeppesen (RETIRED)
Details
amavisd-new-2.2.0.ebuild (amavisd-new-2.2.0-r1.ebuild,4.22 KB, text/plain)
2004-11-23 08:36 UTC, Sune Kloppenborg Jeppesen (RETIRED)
Details
amavisd.rc6 (amavisd,301 bytes, text/plain)
2004-11-23 13:57 UTC, Sune Kloppenborg Jeppesen (RETIRED)
Details
amavisd-new-2.2.0.ebuild (amavisd-new-2.2.0-r2.ebuild,3.90 KB, text/plain)
2004-12-09 01:09 UTC, Sune Kloppenborg Jeppesen (RETIRED)
Details
amavisd-new-0.20040701.ebuild (amavisd-new-0.20040701.ebuild,4.18 KB, text/plain)
2004-12-13 13:52 UTC, Sune Kloppenborg Jeppesen (RETIRED)
Details
amavisd-new-0.20040701.ebuild (amavisd-new-0.20040701.ebuild,4.17 KB, text/plain)
2004-12-14 09:29 UTC, Sune Kloppenborg Jeppesen (RETIRED)
Details
amavisd-new-2.2.0.ebuild (amavisd-new-2.2.0-r3.ebuild,4.27 KB, text/plain)
2004-12-14 09:31 UTC, Sune Kloppenborg Jeppesen (RETIRED)
Details
amavisd-new-2.2.0.ebuild (amavisd-new-2.2.0-r3.ebuild,4.07 KB, text/plain)
2004-12-14 09:37 UTC, Sune Kloppenborg Jeppesen (RETIRED)
Details
amavisd-conf.diff (amavisd-conf.diff,1.03 KB, text/plain)
2004-12-15 00:50 UTC, Sune Kloppenborg Jeppesen (RETIRED)
Details
amavisd-new-2.2.0.ebuild (amavisd-new-2.2.0-r4.ebuild,4.10 KB, text/plain)
2004-12-15 11:46 UTC, Sune Kloppenborg Jeppesen (RETIRED)
Details
amavisd-new-2.2.0.ebuild (amavisd-new-2.2.0-r4.ebuild,4.05 KB, text/plain)
2004-12-15 14:34 UTC, Sune Kloppenborg Jeppesen (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description D-Bugger 2004-09-17 15:07:27 UTC
Not much to say ... latest version of amavisd-new, works for me!

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 D-Bugger 2004-09-17 15:08:04 UTC
Created attachment 39807 [details]
the ebuild
Comment 2 D-Bugger 2004-09-17 15:09:47 UTC
Created attachment 39808 [details, diff]
some amavisd.conf mods
Comment 3 Daniel Webert 2004-09-17 18:30:01 UTC
*** Bug 61540 has been marked as a duplicate of this bug. ***
Comment 4 kfm 2004-09-23 04:18:53 UTC
There are three issues that I've discovered with the amavisd-new ebuild:

1) The section which calls razor-admin to create a configuration profile under
${AMAVIS_ROOT} fails _if_ the directory /etc/razor exists and it contains a
razor-config file. Specifically, it will not create the
${AMAVIS_ROOT}/.razor/razor-config file because it opts to defer to the file
contained under /etc/razor. This causes the sed operation following to fail,
and obviously breaks the intended purpose of the process there. I daresay this was a problem in the previous ebuilds too.

2) The default location for the process ID file is now /var/amavis/amavisd.pid.
This prevents the init.d script from shutting down the service properly. The
solution is either

  (a) to patch /etc/amavisd.conf to use: $pid_file  = "/var/run/amavisd.pid";
  (b) to alter the init.d script to use /var/amavis/amavisd.pid when shutting
      down the service.

3) There is also the matter of the incompatibility with spamassassin-3.0 as
described in http://bugs.gentoo.org/show_bug.cgi?id=58057#c32 (due to the fact
that amavis is hardcoded to use what is now the wrong path to invoke
spamassassin.

My tests were conducted with razor-2.62, spamassassin-3.0 and the amavisd-new ebuild in this bug.
Comment 5 kfm 2004-09-23 04:21:08 UTC
Correction, for problem (3) I meant that the spamassassin-3.0 ebuild sets a DATADIR which causes it not to interoperate with amavisd-new.
Comment 6 kfm 2004-09-23 04:23:45 UTC
Furthermore, I meant razor-agent.conf (not razor-config) ... excuse me while I go and prepare some more coffee ;)
Comment 7 kfm 2004-09-23 05:15:45 UTC
With regard to the spamassassin compatibility, I've found that the easiest thing to do is to set:

  DEF_RULES_DIR => '/usr/share/spamassassin/core',

in the block that instantiates the Mail::Spamassassin object in /usr/sbin/avamisd (line #10202). I suppose the question is how to support both the 2.x and 3.x series of spamassassin in this ebuild.

By the way (as a matter of curiosity), isn't sed frowned upon in ebuilds in favour of patching?
Comment 8 kfm 2004-09-23 05:34:32 UTC
OK, I think I have a neat solution. Apply a patch which alters line #10202 in /usr/sbin/amavisd from:

  #   DEF_RULES_DIR     => '/usr/local/share/spamassassin',

to:

  DEF_RULES_DIR     => ((-e '/usr/share/spamassassin/core') ? '/usr/share/spamassassin/core' : '/usr/share/spamassassin'),

I'll attach a patch which does exactly that (just a -p0 job). Can anyone
percieve any problems with this approach?
Comment 9 kfm 2004-09-23 05:37:19 UTC
Created attachment 40216 [details, diff]
spamassassin-3.x compat patch

Alters the instantiation of the Mail::SpamAssassin object so that the named
parameter DEF_RULES_DIR will be '/usr/share/spamassassin/core' if the directory
exists, or /usr/share/spamassassin otherwise.
Comment 10 klavs klavsen 2004-09-23 05:40:20 UTC
That can't possibly be done? patching a file, belonging to another package, while installing SpamAssassin-3.0 wouldn't be allowed by the sandbox.

If you mean, that you want to update the amavisd-new ebuild, so it does this - then there's the problem that people will have to update/reinstall their amavisd-new to get it working with spamassassin-3.0 - IMHO bad behavior - means there has to be an einfo about this - and I personally hate stuff, that doesn't "just work".
The author of amavisd-new says he has prepared amavisd-new so it just should work with SA-3 - isn't the only reason it doesn't on Gentoo - that the files are placed in an odd folder - instead of where the default is?
Comment 11 kfm 2004-09-23 05:49:00 UTC
> That can't possibly be done? patching a file, belonging to another package,
while installing SpamAssassin-3.0 wouldn't be allowed by the sandbox.

I don't follow - the patch falls purely within the scope of the amavisd-new ebuild and alters usr/sbin/amavisd. What's the issue with that?

> If you mean, that you want to update the amavisd-new ebuild, so it does this
> - then there's the problem that people will have to update/reinstall
> their amavisd-new to get it working with spamassassin-3.0

Yes, this is true. There are a a few other ebuilds in portage which exhibit this class of problem (having to rebuild aspell after I upgraded gcc to avoid a compilation failure in a newer version of gedit which links to aspell being one of the more obscure examples I can think of). I don't like it much either and I think some ebuilds should be able to request the recompilation/rebuilding of others - but that's way out of scope here ;)

> isn't the only reason it doesn't on Gentoo - that the files are placed in an
odd folder - instead of where the default is?

If you meant that the DATADIR is being altered from its default upstream
configuration then (1) I don't actually know because admittedly I haven't
checked (2) yes, you are absolutely right - my suggestion should be ignored and
the "proper" solution should probably go in another bug if it hasn't already.
Comment 12 Ulysses Cruz 2004-09-23 07:31:41 UTC
This patch looks like it will work to me. Hopefully you can get this ebuild into portage soon, as it is anyone trying to use amavisd-new and SA 3.0 has a broken system, and no obvious clues why.
Comment 13 kfm 2004-09-23 07:43:59 UTC
Yes, it does work. I don't see the issue with it - the older versions can be revision bumped, and this new ebuild could go in as unstable. However, as Klavs Klansen mentioned, if the spamassassin ebuild is configuring for a non-standard location for the rulesets then maybe it is that ebuild that should be fixed.

Aside from this, there are still the other flaws with the ebuild that I mentioned originally. I'll make more posts on this bug if I work out anything sensible regarding that. I can't be sure what is the "right" or the "wrong" way so I'm hoping a dev will step in at some point and clean this all up ;)
Comment 14 klavs klavsen 2004-09-23 07:51:37 UTC
It looks to me, like the spamassassin ebuild is the buggy one:
(from SA-3 ebuild)
# - Set DATADIR to a subdirectory so other ebuilds which offer rules can store
#   their stuff below the dir, too.
myconf="SYSCONFDIR=/etc DATADIR=/usr/share/spamassassin/core"

This makes no sense to me - if other ebuilds did that - SA-3 wouldn't look for them there - otherwise we wouldn't have the problem with amavisd-new that we have.
ie. ALL rules needs has to be in the same dir AFAIK - and atleast the SA-core rules, should be where they are suppose to be.

If you agree (thus I'm not blind/stupid :) - this should perhaps be turned into a SpamAssassin ebuild problem - or a new bug be created?


Comment 15 kfm 2004-09-23 08:00:40 UTC
I got off my backside and checked ;) ... indeed you are correct. The default is
/usr/share/spamassassin for a standard build. One might file it at bug #58057, but
mcummings said that the bug was just to track the release process so it looks like
a new bug is needed. I'll do it later if no-one else has (if you feel like doing
it then please link it here :).

Maybe the change was for a reason, but on the face of it I can't think why.
Comment 16 Ulysses Cruz 2004-09-23 08:08:43 UTC
According to te comment in the SA 3.0 ebuild, it's to allow other packages to place their rules in different directories, but this really doesn't make sense since, as you say, SA (and amavisd and rulesdujour, etc.) expect all the rules to be in the same directory, or in SA 'home' directory. 

The way I see it is this change just breaks everything else for no good reason.
Comment 17 klavs klavsen 2004-09-23 08:33:43 UTC
http://bugs.gentoo.org/show_bug.cgi?id=65102 submitted.
Comment 18 Patrik Kullman 2004-11-03 04:51:52 UTC
how about amavisd-new-2.2.0 ?
Comment 19 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-11-11 05:18:08 UTC
Created attachment 43721 [details]
amavisd-new-2.2.0.ebuild
Comment 20 Ronald Moesbergen 2004-11-23 07:42:55 UTC
This dep no longer exists:
>=dev-perl/MIME-tools-6.2
It should be 
>=dev-perl/MIME-tools-5.415

Also, when I place this ebuild in my overlay, portage does not see it as a newer version (2.2.0 is not newer than 20040701). I had to rename the ebuild to amavisd-new-20041102.ebuild, but then the download failed because the wrong filename was used.
Comment 21 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-11-23 08:36:20 UTC
Created attachment 44578 [details]
amavisd-new-2.2.0.ebuild

MIME-tools dependency fixed.

Some of the archiving applications could probably be removed as dependencies
also.

Add >=mail-filter/amavisd-new-200 to /etc/portage/package.mask to get around
the previous odd versioning scheme.
Comment 22 Ronald Moesbergen 2004-11-23 13:41:18 UTC
I tested further and found one more thing, the init.d script needs to be changed so the stop action uses the right pidfile, /var/amavis/amavisd.pid:

-start-stop-daemon --stop --quiet --pidfile /var/run/amavis/amavisd.pid
+start-stop-daemon --stop --quiet --pidfile /var/amavis/amavisd.pid

Other than that, it works great! Will this ebuild be checked in to cvs soon? The only problem now is how to handle the version stuff.
Comment 23 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-11-23 13:57:15 UTC
Created attachment 44604 [details]
amavisd.rc6

Fixed init script.

One thing I noted is that amavisd-nanny and amavisd-agent dies with:

BDB no env: No such file or directory

So either we should not install (they were added in the previous ebuild
submitted) them or get it fixed.

I'm a bit short on time right now, but if I'll try to take a look at it soon if
noone else does before.
Comment 24 kfm 2004-11-23 19:05:57 UTC
<quote>I tested further and found one more thing, the init.d script needs to be changed so the stop action uses the right pidfile<quote>

Er, I pointed that out as the second of three problems in comment #4!

Please note that the first problem I describe in that comment also *still* applies (yes it's a genuine bug, not just a complaint) - Sune, do you have any thoughts on it?

<quote>So either we should not install (they were added in the previous ebuild
submitted) them or get it fixed.<quote>
Well I, for one, am definitely in favour of getting things fixed. Thanks for looking at this; I'll try and find some time myself to help conclude these problems.
Comment 25 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-11-24 06:31:32 UTC
Kerin, I cannot recreate the razor problem.

As for the amavisd-nanny amavisd-agent problem you have to remove /etc/amavisd.conf before emerging the package or add:

$enable_db = 1;              # enable use of BerkeleyDB/libdb (SNMP and nanny)

Somehow etc-update is not playing nicely with the changed versioning scheme I guess.
Comment 26 kfm 2004-11-24 07:33:24 UTC
Ah, I see. I'll run through it again from scratch and see what happens on my end.
Comment 27 Robson Paniago 2004-12-01 05:04:49 UTC
I also found that amavisd-new-2.2.0.ebuild is missing a RDEPENDS to dev-perl/BerkeleyDB.
Comment 28 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-12-01 05:26:46 UTC
dev-perl/BerkeleyDB is listed in RDEPEND on line 44 of the current ebuild.

CC'ing net-mail herd.

If I had commit rights I'd be willing to maintain this one.
Comment 29 Tuan Van (RETIRED) gentoo-dev 2004-12-07 09:05:52 UTC
Sune, I'll commit this if you willing to help with bug.
Comment 30 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-12-07 10:09:09 UTC
Tuan, I'm here to assist should any bugs crop up.
Comment 31 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-12-07 22:21:05 UTC
With the new versioning scheme Portage will not pick this up as an update.

After talking with Genone I think we should do the following:

1. Commit 2.2.0 (perhaps add a small comment saying something about abandoning the date versioning scheme).
2. Commit 20040701 as 0.20040701 with added comments as above.
3. Mask 20040701 so stable users will be "downgraded" to 0.20040701.

Repeat step 2+3 for 20030616_p9 and 20030616_p8.

Any thoughts? Otherwise I'll provide the updated ebuilds shortly.
Comment 32 Tuan Van (RETIRED) gentoo-dev 2004-12-08 09:17:37 UTC
Sune, sound like a good plan. BTW, would please take a look at these bugs to see if we need to add anything. Close them if it is fixed in the new ebuild. Thanks.
Comment 33 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-12-09 01:09:46 UTC
Created attachment 45587 [details]
amavisd-new-2.2.0.ebuild

- Fixed SRC_URI
- Removed the warning about new home directory (was for previous version).
- Modified warning if SpamAssassin is not installed to not mention specific
line numbers in amavisd.conf.
- Added dep on cabextract and removed dep on zoo and freeze.
Comment 34 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-12-13 13:52:31 UTC
Created attachment 45932 [details]
amavisd-new-0.20040701.ebuild

diff amavisd-new-0.20040701.ebuild
/usr/portage/mail-filter/amavisd-new/amavisd-new-20040701.ebuild
7,8d6
< MY_VERSION="20040701"
<
11c9
< SRC_URI="http://www.ijs.si/software/amavisd/${PN}-${MY_VERSION}.tar.gz"
---
> SRC_URI="http://www.ijs.si/software/amavisd/${PN}-${PV/_/-}.tar.gz"
Comment 35 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-12-14 09:29:53 UTC
Created attachment 45978 [details]
amavisd-new-0.20040701.ebuild

Cosmetic fix.
Comment 36 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-12-14 09:31:29 UTC
Created attachment 45980 [details]
amavisd-new-2.2.0.ebuild

Add initial courier support.
Comment 37 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-12-14 09:37:30 UTC
Created attachment 45981 [details]
amavisd-new-2.2.0.ebuild

Removed courier einfo warning as it seems to be wrong.
Comment 38 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-12-15 00:50:01 UTC
Created attachment 46020 [details]
amavisd-conf.diff

Minor fix to default config.
Comment 39 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-12-15 11:46:19 UTC
Created attachment 46062 [details]
amavisd-new-2.2.0.ebuild

Fixed epatch statement.
Comment 40 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-12-15 14:34:28 UTC
Created attachment 46081 [details]
amavisd-new-2.2.0.ebuild

Should work for non Courier users even with Courier patch. Removing last
warning.
Comment 41 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2004-12-23 01:31:36 UTC
2.2.1 released. Bump works fine. (Not adding app-arch/pax to DEPEND as it is only stable on a few arches).
Comment 42 Tuan Van (RETIRED) gentoo-dev 2004-12-23 08:49:57 UTC
I stabled 20040701 yesterday on x86. I'll let it sit for a day or two then revision it to .20040701 then bring this in. Thanks.
Comment 43 kfm 2004-12-24 17:30:05 UTC
Sune, thanks for all of your excellent work on this. I grabbed the amavisd-new-2.2.0 ebuild and bumped it to 2.2.1 (masking anything >2.2.1) and installed it. Thus far, everything is working as expected and all of the gremlins discussed prior on this bug appear to have been resolved :)
Comment 44 Sune Kloppenborg Jeppesen (RETIRED) gentoo-dev 2005-01-18 10:30:09 UTC
Seems like further progress will be tracked on bug 77425.
Comment 45 Tuan Van (RETIRED) gentoo-dev 2005-01-19 15:19:27 UTC
Thanks everyone.