Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 666576 - =mail-filter/spamassassin-3.4.2: sql breakage in AWL
Summary: =mail-filter/spamassassin-3.4.2: sql breakage in AWL
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Philippe Chaintreuil
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2018-09-19 17:48 UTC by Daniel M. Weeks
Modified: 2018-10-28 21:58 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel M. Weeks 2018-09-19 17:48:50 UTC
See upstream bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7631

Reproducible: Always
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2018-10-18 11:02:00 UTC
See "Mail-SpamAssassin-3.4.2/sql/txrep_mysql.sql":

CREATE TABLE txrep (
  username varchar(100) NOT NULL default '',
  email varchar(255) NOT NULL default '',
  ip varchar(40) NOT NULL default '',
  count int(11) NOT NULL default '0',
  totscore float NOT NULL default '0',
  signedby varchar(255) NOT NULL default '',
  last_hit timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (username,email,signedby,ip),
  KEY last_hit (last_hit)
) ENGINE=InnoDB;


I cannot tell you if an upgrade script missed that change but a fresh installation will have "last_hit" column.
Comment 2 Philippe Chaintreuil 2018-10-18 11:07:27 UTC
This relates to AWL, not TxRep.

https://github.com/apache/spamassassin/blob/3.4/sql/awl_mysql.sql
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2018-10-18 11:18:42 UTC
OK, so when we will update sql/awl_mysql.sql and add that missing column, things should be fixed. How do you, as user, expect to get notified about such a schema change? Is an elog telling user "If using awl feature, please compare your database schema against sql/awl_mysql.sql" enough?
Comment 4 Philippe Chaintreuil 2018-10-28 20:34:23 UTC
Submitted Github PR to address this w/ upstream's documentation patches for 3.4.3 (not released) and an elog to bring attention to it.

https://github.com/gentoo/gentoo/pull/10285
Comment 5 Larry the Git Cow gentoo-dev 2018-10-28 21:58:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=062c17593eacdd7c9f9e9789afe81f6ec6fa1021

commit 062c17593eacdd7c9f9e9789afe81f6ec6fa1021
Author:     Philippe Chaintreuil <gentoo_bugs_peep@parallaxshift.com>
AuthorDate: 2018-10-28 19:29:51 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2018-10-28 21:58:21 +0000

    mail-filter/spamassassin: Update docs and warn about SQL schema changes
    
    Pull patches from upstream to address AWL + TxRep SQL schema changes
    that were introduced in 3.4.2, but we're documented in it's initial
    release.
    
    Upstream-bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7631
    Closes: https://bugs.gentoo.org/666576
    Package-Manager: Portage-2.3.49, Repoman-2.3.11
    Signed-off-by: Philippe Chaintreuil <gentoo_bugs_peep@parallaxshift.com>
    Closes: https://github.com/gentoo/gentoo/pull/10285
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 .../files/spamassassin-3.4.2-bug_7631.patch        |  61 +++++
 .../spamassassin/spamassassin-3.4.2-r3.ebuild      | 283 +++++++++++++++++++++
 2 files changed, 344 insertions(+)