You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2017/11/03 12:22:08 UTC

[Bug 7497] New: Certain Language Specific Rule entries are breaking rule gen on the new box

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7497

            Bug ID: 7497
           Summary: Certain Language Specific Rule entries are breaking
                    rule gen on the new box
           Product: Spamassassin
           Version: SVN Trunk (Latest Devel Version)
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: RuleQA
          Assignee: dev@spamassassin.apache.org
          Reporter: kmcgrail@apache.org
  Target Milestone: Undefined

Thanks to Merijn van den Kroonenberg, he identified that the new box had some
grep issues on a line on a long-standing rule in my sandbox that had multiple
language definitions.

Re: the grep issue, on older CentOS boxes, I would be looking for a LANG=en_US
setting as one possible culprit.  Any ideas where that might be on Ubuntu?

For triage, I nuked the line:

[kmcgrail@talon2 kmcgrail]$ svn commit -m 'Removing language specific
descriptions which are not grepping properly on new box for masscheck'
Sending        20_rules_to_sandbox.cf
Transmitting file data .
Committed revision 1813992.

This worked but the underlying issue of why I had to do this remains and this
ticket exists so we can revert the rule change.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7497] Certain Language Specific Rule entries are breaking rule gen on the new box

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7497

Henrik Krohns <ap...@hege.li> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |apache@hege.li

--- Comment #4 from Henrik Krohns <ap...@hege.li> ---
So is the locale fixed?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7497] Certain Language Specific Rule entries are breaking rule gen on the new box

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7497

Merijn van den Kroonenberg <me...@web2all.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |merijn@web2all.nl

--- Comment #1 from Merijn van den Kroonenberg <me...@web2all.nl> ---

The actual code causing the problem:

./masses/rule-update-score-gen/generate-new-scores.sh:202:grep -v ^score
rules/72_active.cf > rules/72_active.cf-scoreless
./masses/rule-update-score-gen/generate-new-scores.sh:203:mv -f
rules/72_active.cf-scoreless rules/72_active.cf

basically all score lines are stripped from 72_active.cf

Additionally I am wondering if those grep statements might be removed
altogether, because right now they are not doing a thing, as all score
statements in the 72_active.cf are commented out. I think this is done by the
build/mkrules program.

build/mkrules line 455:
      # comment "score" lines for sandbox rules (bug 5558)
      # use generated scores, though, if the rule is active
      if ($type eq 'score' && $issandbox &&
        !($isscores && $active_rules->{$name}))
      {
        $orig =~ s/^/#/g;
      }

But I don’t understand above code enough to be sure.

To test or experiment with grep and special characters:

wget http://sa-update.ena.com/1813258.tar.gz
extract the 72_active.cf
Then experiment with locale settings(eg. SET LANG=en_US)
and run:
grep -v ^score 72_active.cf > test.cf
And test.cf should not end with the line: 
Binary file 72_active.cf matches

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7497] Certain Language Specific Rule entries are breaking rule gen on the new box

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7497

Kevin A. McGrail <km...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |davej@apache.org,
                   |                            |kmcgrail@apache.org

--- Comment #3 from Kevin A. McGrail <km...@apache.org> ---
Merijn & Dave, is this resolved

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 7497] Certain Language Specific Rule entries are breaking rule gen on the new box

Posted by bu...@bugzilla.spamassassin.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7497

Bill Cole <sa...@billmail.scconsult.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sa-bugz-20080315@billmail.s
                   |                            |cconsult.com

--- Comment #2 from Bill Cole <sa...@billmail.scconsult.com> ---
(In reply to Kevin A. McGrail from comment #0)

> Re: the grep issue, on older CentOS boxes, I would be looking for a
> LANG=en_US setting as one possible culprit.  Any ideas where that might be
> on Ubuntu?

/etc/default/locale (or /etc/environment on older versions)

-- 
You are receiving this mail because:
You are the assignee for the bug.