SA Bugzilla – Bug 2374
SA looking for local.cf in a different directory
Last modified: 2003-09-01 00:43:48 UTC
Installed rc3 last night. This morning, I found all my spam was wrapped in lovely MIME attachments. I didn't touch my config. I have "report_safe 0" defined in my local.cf. Fails for both spamd and spamassassin. Anyone else seeing this?
Subject: Re: [SAdev] New: "report_safe 0" being ignored in 2.60rc3 On Fri, Aug 29, 2003 at 07:03:42AM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote: > Installed rc3 last night. This morning, I found all my spam was wrapped in > lovely MIME attachments. I didn't touch my config. I have "report_safe 0" > defined in my local.cf. Fails for both spamd and spamassassin. > > Anyone else seeing this? Nope. Works beautifully for me.
Me neither. Installed rc3 30 minutes ago, and everything is fine.
Actually -- just realised -- My entire local.cf file is being ignored. (Spotted the symptom, not the cause). Has something changed in the defining of my /etc folder? spamassassin -d shows: debug: using "/usr/local/etc/mail/spamassassin" for site rules dir
Yeah, the behaviour of the Makefile has changed a bit since 2.5x: SA will only look for config files in /etc if it got installed to /usr. Else it looks in $PREFIX/etc. You can change the dir via perl Makefile.PL PREFIX=/usr/local SYSCONFDIR=/etc (this was fixed in bug 2359 for RC3). That's the behaviour as it is described in the head of Makefile.PL; I'm not too sure if its really a good idea though. (Esp. because somebody else, Christopher X. Candreva on sa-talk, stumbled over this, too.) This might give us some headaches from upgrading people. Maybe we should take the SYSCONFDIR only as *additional* config dir, so SA looks both in /etc and $PREFIX/etc? I dunno. Comments, devs?
Bloody windows users -- ruining it for the rest of us ;) This definitely needs to be handled more gracefully -- My config has been in /etc since I started using SA.
Please leave the meta alone :) I think putting stuff into /usr/local/etc when /usr/local is the PREFIX is correct according to the FHS. And you can always override it with SYSCONFDIR. I'm just not sure if we should really change this behaviour, however correct and easy to "fix" it is :)
urgh, that is messy. Perhaps we should use /etc if PREFIX==/usr/local, as well. Rod, how did you run Makefile.PL? Just "perl Makefile.PL"?
Yeah, I just followed the same install procedure I've used since forever. perl Makefile.PL make make test sudo make install
Created attachment 1295 [details] proposed patch against Makefile.PL This patch makes it default to /etc for /usr/local, too. Also updates the description for the command line vars. I think I'll rewrite that description though, it's not very easy to grok (patch will follow). SA is also installed in /usr/local if Perl was put there.
rod, PLEASE don't change the meta infos on this bug (priority, milestone, etc.) all the time. I guess you still have an old version in your browser cache, please hit reload before you add the next comment.
ok, let's consider the situation. PREFIX etc-dir /usr /etc /usr/local /etc /home/jm/usr /home/jm/etc (good) /usr/sa260 /usr/etc (I think. in this case the user would probably have chosen an etc dir to go along with the wierd install location.) /opt/sa /opt/etc (I think?) I'm not sure if this is the correct way to do it. hmm. Hey Dan -- you're the FHS guy!
I'd say: PREFIX SYSCONFDIR /usr /etc /usr/local /etc *grmbl* FHS 2.2 4.9.2 says "No other directories, except those listed below, may be in /usr/local after first installing a FHS-compliant system." But isn't very clear about the corresponding etc. seems like this is the correct way though /home/jm/usr /home/jm/etc hmmm... why not /usr/sa260 /usr/sa260/etc just put it below there so the etc is where the bin is /opt/sa /etc/opt/sa according to FHS 2.2 3.12.2
assigning to me, got a nice patch :)
Created attachment 1296 [details] new patch (not final) against Makefile.PL ok, added *loads* more docu about the command line vars. this patch still isn't FHS-complaint though (will create a new one when we foudn a consensus).
/home/jm/usr -> /home/jm/etc is too complicated, code-wise. Will be /home/jm/usr/etc.
Created attachment 1297 [details] (I hope) final patch against Makefile.PL ok. now it does the following conversions: PREFIX SYSCONFDIR /usr /etc /usr/local /etc /opt/foo /etc/opt # not 100% FHS but should be ok /foo/bar /foo/bar/etc /foo/bar/usr /foo/bar/usr/etc
I'm puzzled. I installed the same way as Rod and sa -D tells me this: debug: using "/etc/mail/spamassassin" for site rules dir How can this be? Also, I would like to draw attention to the fact that the traditional site rules dir is "/etc/mail/spamassassin", so all this talking about paths /usr /etc /usr/local /etc /home/jm/usr /home/jm/etc /opt/sa /etc/opt/sa makes me wonder. Where do you put it for /home/jm/usr or /opt/sa ? In /home/jm/etc/mail/spamassassin and /etc/opt/sa/mail/spamassassin? It also makes me wonder what the proposed SYSCONFDIR=/etc switch would do. Configure for /etc/spamassassin or the traditional /etc/mail/spamassassin ?
The problem only occurend if you have a Perl which is has a prefix of /usr/local itself. So I guess you've got yours in /usr. For the rest: RTFM in that patch :) Short: SYSCONFDIR is only the base name for the config dir, there's always /mail/spamassassin added. If you want something else, you can set LOCAL_RULES_DIR to a full path instead.
I attached a patch to bug 2388 (attachment 1304 [details]) which will hopefully fix all this stuff. Please test it. *** This bug has been marked as a duplicate of 2388 ***