From 8259e055040fd9f588f333f4c4b6d46c3eb71222 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sat, 31 Jan 2026 22:10:20 +0100 Subject: [PATCH] Update to current Debian version. Signed-off-by: Thomas Hochstein --- ChangeLog | 1 + MOD/DBIUtils.pm | 4 ++-- MOD/DBIUtilsPublic.pm | 2 +- MOD/ReadMail.pm | 2 +- bin/read-mail.pl | 1 + 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 73ead48..0b84aac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ huhu 0.11.0 (unreleased) * Re-order and add metadata files (TODO, ChangeLog, ...). +* Update to current Debian version. huhu 0.10 (unknown) * huhu reports version 0.09 (from MOD/Displaylib.pm), but has code diff --git a/MOD/DBIUtils.pm b/MOD/DBIUtils.pm index 61edfde..fcdb029 100644 --- a/MOD/DBIUtils.pm +++ b/MOD/DBIUtils.pm @@ -21,7 +21,7 @@ use DBI(); use MOD::Utils qw(read_private_config); use News::Article(); use MOD::DBIUtilsPublic(); -use Digest::SHA1(); +use Digest::SHA(); push @MOD::DBIUtils::ISA,'MOD::DBIUtilsPublic'; @@ -81,7 +81,7 @@ sub enter_table($$$$) my $article_id = undef; my $age = $self->{'config'}->{'check_duplicates_age'} || 7; - my $sha1 = Digest::SHA1::sha1_hex($body); + my $sha1 = Digest::SHA::sha1_hex($body); my $stmt = $self->{'dbh'}->prepare( "SELECT id\n" . "\nFROM " . $table . diff --git a/MOD/DBIUtilsPublic.pm b/MOD/DBIUtilsPublic.pm index a9a3515..d312a99 100644 --- a/MOD/DBIUtilsPublic.pm +++ b/MOD/DBIUtilsPublic.pm @@ -48,7 +48,7 @@ sub new($$) my ($class,$configref) = @_; my $self = {}; $self->{'config'} = $configref; - $self->{'dsn'} = "DBI:mysql:database=$self->{'config'}->{'mysql_db'};host=$self->{'config'}->{'mysql_host'};port=$self->{'config'}->{'mysql_port'}"; + $self->{'dsn'} = "DBI:MariaDB:database=$self->{'config'}->{'mysql_db'};host=$self->{'config'}->{'mysql_host'};port=$self->{'config'}->{'mysql_port'}"; $self->{'dbh'} = DBI->connect($self->{'dsn'},$self->{'config'}->{'mysql_username'},$self->{'config'}->{'mysql_password'}, { RaiseError => 1}) or die($DBI::errstr); diff --git a/MOD/ReadMail.pm b/MOD/ReadMail.pm index 27d9386..d50f169 100644 --- a/MOD/ReadMail.pm +++ b/MOD/ReadMail.pm @@ -100,7 +100,7 @@ sub add_article($$;$) } if ($config->{'subjectcheck'} and - $db->check_subject($article->header('subject'))) + $db->check_subject($article->header('subject'))) { my $subjectscore = $config->{'subjectscore'}; $article->add_headers('X-Subject-Test', $subjectscore); diff --git a/bin/read-mail.pl b/bin/read-mail.pl index 9511405..f1622de 100755 --- a/bin/read-mail.pl +++ b/bin/read-mail.pl @@ -125,6 +125,7 @@ sub process_text($$$) die 'Argument -config=file missing' unless($::config); $::status = undef unless($::status); # to suppress warning $::stdin = undef unless($::stdin); # to suppress warning +$::test = undef unless($::test); # to suppress warning my %config = MOD::Utils::read_private_config($::config); my $rm = MOD::ReadMail->new(\%config);