On Sun, Apr 14, 2002 at 12:21:35PM -0700, Bart Schaefer wrote: > I've been trying to think how to correctly relocate $(LOCAL_RULES_DIR) > relative to $(PREFIX) when building SA. The problem of course being that > in the "normal" case, /etc is not relative to $Config{prefix}, which is > the default value of $(PREFIX). This is particularly important when > a non-root user is installing. > > Choices appear to be: > > (1) Change $(LOCAL_RULES_DIR) to always be $(PREFIX)/etc/spamassassin, > giving up on using /etc/mail unless the installer edits Makefile.PL. I > note that /usr/local/etc/spamassassin is already being searched before > /etc/mail/spamassassin by the ordering of the @site_rules_path array, but > there seems to be some feeling among sa-talk posters that /etc/mail is the > "right" place to put this.
No. That is an awful idea. Configuration files should ALWAYS be under /etc/. Failure to do so is a violation of the FHS (Filesystem Hierarchy Standard). > (3) Test e.g. EUID at the time Makefile is generated to decide whether to > prepend $(PREFIX) to the path. This helps out the non-root installer, but > has two drawbacks: root still can't usefully specify "make PREFIX=...", > and "perl Makefile.PL" has to be run with the same EUID as "make install". EUID is a bad idea. People don't make as root, people make install as root. > Index: Makefile.PL > =================================================================== > RCS file: /cvsroot/spamassassin/spamassassin/Makefile.PL,v > retrieving revision 1.24 > diff -u -r1.24 Makefile.PL > --- Makefile.PL 19 Feb 2002 20:17:41 -0000 1.24 > +++ Makefile.PL 14 Apr 2002 18:19:34 -0000 > @@ -3,6 +3,8 @@ > my $DEF_RULES_DIR = '$(PREFIX)/share/spamassassin'; > > my $LOCAL_RULES_DIR = '/etc/mail/spamassassin'; > + $LOCAL_RULES_DIR = '$(PREFIX)/etc/spamassassin' > + unless ($Config{prefix} eq '/usr' && -w '/'); > > my $MYCFLAGS = ''; # this is a good place to put -g etc. > What's wrong with my $LOCAL_RULES_DIR = '$(PREFIX)/../etc/mail/spamassassin'; -- Duncan _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk