You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by L A Walsh <sa...@tlinx.org> on 2020/10/26 00:29:17 UTC

Re: sa-scripts hard-code perl loc, and can end up referring to wrong libs or data

Putting the questions/wants 1st, for those wanting the bottom line.
For backstory/why, see further on.

2 things:

1)  Is it too much effort to only use the major/minor for sa-files?

   i.e. instead of numbering: "3.002000/  3.004000/  3.004004/" using
   "3.002/  3.004/" ...?  Where the patch level was guaranteed not
    to cause some "incompat" with the previous Maj.Min"?

2)  Not put the perl version in the scripts -- especially when it is
not in the PATH.



Prologue/why:

Been tracking down a problem specific to my setup/machine
where some assumptions made by SA, aren't the same as the
ones I made...

I invoke /usr/bin/sa-prog, which normally I'd expect to use
the perl in the same path @ /usr/bin/perl.

That, in contains the lib paths.  Then it uses a independent
path /var/lib/spamassassin/V/...

My perls physically reside in /home/perl/perl-5.M.m, where I
currently tell them to install relative stuff in <perlbase>/usr/{lib,bin}.

A few apps use perllibs in /usr/lib/perl5/{.,site_perl,vendor_perl}/5.X.y
with top-of-trees being in the /usr/lib/perl5/5.x.y for stuff from the perl
org, and other stuff from vendor and local-site (me) under vendor or 
site perl.

The problem seems to be:
head -1 /usr/bin/sa-update
#!/home/perl/perl-5.16.3/bin/perl -T -w

so each sa version has a lock to-version in it.  Sa has tried
to put its data under /var/lib/SA/SA-VER and force a new dir
on each SA-update, but for their compiled's, it only goes by

ll /var/lib/spamassassin/compiled/
Oct 10  2011 5.012/
May 20  2012 5.014/
Oct 24 02:01 5.016/

the major+minor perl version and doesn't include the patch
level.

Re: sa-scripts hard-code perl loc, and can end up referring to wrong libs or data

Posted by "Kevin A. McGrail" <km...@apache.org>.
I believe if you install a version of sa yourself from a tar, you will see
they use a .raw file without the Perl hardcoded.  It is then relaxed at
install time.

On Sun, Oct 25, 2020, 20:29 L A Walsh <sa...@tlinx.org> wrote:

> Putting the questions/wants 1st, for those wanting the bottom line.
> For backstory/why, see further on.
>
> 2 things:
>
> 1)  Is it too much effort to only use the major/minor for sa-files?
>
>    i.e. instead of numbering: "3.002000/  3.004000/  3.004004/" using
>    "3.002/  3.004/" ...?  Where the patch level was guaranteed not
>     to cause some "incompat" with the previous Maj.Min"?
>
> 2)  Not put the perl version in the scripts -- especially when it is
> not in the PATH.
>
>
>
> Prologue/why:
>
> Been tracking down a problem specific to my setup/machine
> where some assumptions made by SA, aren't the same as the
> ones I made...
>
> I invoke /usr/bin/sa-prog, which normally I'd expect to use
> the perl in the same path @ /usr/bin/perl.
>
> That, in contains the lib paths.  Then it uses a independent
> path /var/lib/spamassassin/V/...
>
> My perls physically reside in /home/perl/perl-5.M.m, where I
> currently tell them to install relative stuff in <perlbase>/usr/{lib,bin}.
>
> A few apps use perllibs in /usr/lib/perl5/{.,site_perl,vendor_perl}/5.X.y
> with top-of-trees being in the /usr/lib/perl5/5.x.y for stuff from the perl
> org, and other stuff from vendor and local-site (me) under vendor or
> site perl.
>
> The problem seems to be:
> head -1 /usr/bin/sa-update
> #!/home/perl/perl-5.16.3/bin/perl -T -w
>
> so each sa version has a lock to-version in it.  Sa has tried
> to put its data under /var/lib/SA/SA-VER and force a new dir
> on each SA-update, but for their compiled's, it only goes by
>
> ll /var/lib/spamassassin/compiled/
> Oct 10  2011 5.012/
> May 20  2012 5.014/
> Oct 24 02:01 5.016/
>
> the major+minor perl version and doesn't include the patch
> level.
>

Re: sa-scripts hard-code perl loc, and can end up referring to wrong libs or data

Posted by RW <rw...@googlemail.com>.
On Sun, 25 Oct 2020 17:29:17 -0700
L A Walsh wrote:


> 1)  Is it too much effort to only use the major/minor for sa-files?
> 
>    i.e. instead of numbering: "3.002000/  3.004000/  3.004004/" using
>    "3.002/  3.004/" ...?  Where the patch level was guaranteed not
>     to cause some "incompat" with the previous Maj.Min"?

I presume you mean the rules. I have:

Compiled rules  /var/db/spamassassin/compiled/5.032/3.004004/
Rules           /var/db/spamassassin/3.004004/

The rules directory doesn't need to be versioned at all. It's a pain
that it is because it requires an otherwise pointless manual rule update
after a package update, otherwise the code sees no rules.


It doesn't matter much about the compiled rules because SA still works
without it.