You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Rick Cooper <rc...@dwford.com> on 2021/08/30 19:31:42 UTC

Lint problem with KAM.cf

This  have been going on a while but I haven't had time to addresses.
When the KAM rules are updated I see the following lint warning
warn: rules: error: unknown eval 'short_url' for __KAM_SHORT

Near as I can tell I am running the latest DecodeShortURLs.pm but the site
says it's being merged directly into SA. If I change short_url to
short_url_tests the error goes away but I haven't run it down in the code. I
am running SA 3.4.6 and am wondering if there is a new modual for
DecodeShortURLs that I am missing somewhere?

Rick Cooper

Re: Lint problem with KAM.cf

Posted by Mike Grau <mg...@germansfromrussia.org>.
+1 Same issue here.


On 8/30/21 14:31, Rick Cooper wrote:
> This  have been going on a while but I haven't had time to addresses.
> When the KAM rules are updated I see the following lint warning
> warn: rules: error: unknown eval 'short_url' for __KAM_SHORT
> 
> Near as I can tell I am running the latest DecodeShortURLs.pm but the site
> says it's being merged directly into SA. If I change short_url to
> short_url_tests the error goes away but I haven't run it down in the code. I
> am running SA 3.4.6 and am wondering if there is a new modual for
> DecodeShortURLs that I am missing somewhere?
> 
> Rick Cooper
> 

Re: Lint problem with KAM.cf

Posted by Andrew Colin Kissa <an...@topdog.za.net>.
Hi

There is a new DecodeShortURLs in Spamassassin trunk, the API has changed
from the one in the original module on GitHub.

The new builtin module has the short_url function but the original module uses
short_url_tests, the original module does not have a short_url function thus
the error generated.

You possibly need "has" checks to differentiate between the two different modules
with the same name currently in circulation.

- Andrew 

> On 30 Aug 2021, at 23:13, Kevin A. McGrail <km...@apache.org> wrote:
> 
> We will take a look.  We check with lint for every publication but maybe there's a condition we missed or a spelling issue. Thanks for bringing it up. KAM


RE: Lint problem with KAM.cf

Posted by Rick Cooper <rc...@dwford.com>.
It lints fine now
 
Rick

  _____  

From: Kevin A. McGrail [mailto:kmcgrail@apache.org] 
Sent: Wednesday, September 01, 2021 5:43 PM
To: SA Mailing list
Subject: Re: Lint problem with KAM.cf


I published a fix for the KAM SHORT A few hours ago. Please let me know how
it's working for you.

On Tue, Aug 31, 2021, 23:48 Kevin A. McGrail <km...@apache.org> wrote:



On 8/31/2021 12:57 PM, Jared Hall wrote:
> 2) OTOH, what's the point of sa-update doing versioning if nobody uses it?

It's there to support different rulesets but the project as a whole 
found it better to do more complicated things when rules proved 
incompatible to encapsulate them in has(capability), version, and plugin 
tests to avoid that complexity.

I've got a fix for KAM.cf being looked at by another pair of eyes.  
Expect it to be published tomorrow.

Regards,

KAM

-- 
Kevin A. McGrail
KMcGrail@Apache.org

Member, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171




Re: Lint problem with KAM.cf

Posted by "Kevin A. McGrail" <km...@apache.org>.
I published a fix for the KAM SHORT A few hours ago. Please let me know how
it's working for you.

On Tue, Aug 31, 2021, 23:48 Kevin A. McGrail <km...@apache.org> wrote:

>
> On 8/31/2021 12:57 PM, Jared Hall wrote:
> > 2) OTOH, what's the point of sa-update doing versioning if nobody uses
> it?
>
> It's there to support different rulesets but the project as a whole
> found it better to do more complicated things when rules proved
> incompatible to encapsulate them in has(capability), version, and plugin
> tests to avoid that complexity.
>
> I've got a fix for KAM.cf being looked at by another pair of eyes.
> Expect it to be published tomorrow.
>
> Regards,
>
> KAM
>
> --
> Kevin A. McGrail
> KMcGrail@Apache.org
>
> Member, Apache Software Foundation
> Chair Emeritus Apache SpamAssassin Project
> https://www.linkedin.com/in/kmcgrail - 703.798.0171
>
>

Re: Lint problem with KAM.cf

Posted by "Kevin A. McGrail" <km...@apache.org>.
On 8/31/2021 12:57 PM, Jared Hall wrote:
> 2) OTOH, what's the point of sa-update doing versioning if nobody uses it?

It's there to support different rulesets but the project as a whole 
found it better to do more complicated things when rules proved 
incompatible to encapsulate them in has(capability), version, and plugin 
tests to avoid that complexity.

I've got a fix for KAM.cf being looked at by another pair of eyes.  
Expect it to be published tomorrow.

Regards,

KAM

-- 
Kevin A. McGrail
KMcGrail@Apache.org

Member, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171


Re: Lint problem with KAM.cf

Posted by Jared Hall <ja...@jaredsec.com>.
Rick Cooper wrote:
> It would appear you are using the SA git trunk version of the plugin 
> (Andrew Colin Kissa informed me of the existence) which changes a LOT 
> of the api.
> Near as I can tell the old module will work with your rules by adding 
> the following at about line 489 of the DecodeShortURLs.pm module. 
> Seems like the name of the module should have changed to prevent 
> exactly this.
> sub short_url {
>   # Set by parsed_metadata
>   return 0;
> }
> which just copies the behavior of short_url_tests
> Rick
>
> ------------------------------------------------------------------------
>

1) Agreed.  As explained in Steve's GitHub Pull Requests, he has dropped 
SA for RSPAMD anyway.  Although the SA 4.0 version of DecodeShortURLs.pm 
has five additional Evals, it seems to me SA-Core Devs could've kept the 
original "short_url_tests" Eval name if they wanted to.  The .pre file 
in 4.0 could've been modified to check versions and load the correct 
DecodeShortURLs.pm module.  Say, what does happen if two plugins 
register the same Eval rule?  Anybody know?
2) OTOH, what's the point of sa-update doing versioning if nobody uses it?


-- Jared Hall

RE: Lint problem with KAM.cf

Posted by Rick Cooper <rc...@dwford.com>.
It would appear you are using the SA git trunk version of the plugin (Andrew
Colin Kissa informed me of the existence) which changes a LOT of the api.
Near as I can tell the old module will work with your rules by adding the
following at about line 489 of the DecodeShortURLs.pm module. Seems like the
name of the module should have changed to prevent exactly this.
 
sub short_url {
  # Set by parsed_metadata
  return 0;
}

which just copies the behavior of short_url_tests
 
Rick

  _____  

From: Kevin A. McGrail [mailto:kmcgrail@apache.org] 
Sent: Monday, August 30, 2021 5:13 PM
To: Rick Cooper
Cc: SA Mailing list
Subject: Re: Lint problem with KAM.cf


We will take a look.  We check with lint for every publication but maybe
there's a condition we missed or a spelling issue. Thanks for bringing it
up. KAM

On Mon, Aug 30, 2021, 15:31 Rick Cooper <rc...@dwford.com> wrote:


This  have been going on a while but I haven't had time to addresses.
When the KAM rules are updated I see the following lint warning
warn: rules: error: unknown eval 'short_url' for __KAM_SHORT

Near as I can tell I am running the latest DecodeShortURLs.pm but the site
says it's being merged directly into SA. If I change short_url to
short_url_tests the error goes away but I haven't run it down in the code. I
am running SA 3.4.6 and am wondering if there is a new modual for
DecodeShortURLs that I am missing somewhere?

Rick Cooper



Re: Lint problem with KAM.cf

Posted by "Kevin A. McGrail" <km...@apache.org>.
We will take a look.  We check with lint for every publication but maybe
there's a condition we missed or a spelling issue. Thanks for bringing it
up. KAM

On Mon, Aug 30, 2021, 15:31 Rick Cooper <rc...@dwford.com> wrote:

> This  have been going on a while but I haven't had time to addresses.
> When the KAM rules are updated I see the following lint warning
> warn: rules: error: unknown eval 'short_url' for __KAM_SHORT
>
> Near as I can tell I am running the latest DecodeShortURLs.pm but the site
> says it's being merged directly into SA. If I change short_url to
> short_url_tests the error goes away but I haven't run it down in the code.
> I
> am running SA 3.4.6 and am wondering if there is a new modual for
> DecodeShortURLs that I am missing somewhere?
>
> Rick Cooper
>