Bug#903005: stretch-pu: package clamav/0.100.0+dfsg-0+deb9u1

2018-07-05 Thread Sebastian Andrzej Siewior
On 2018-07-05 06:25:45 [+0100], Adam D. Barratt wrote:
> Please go ahead.

uploaded, thanks.

> Regards,
> 
> Adam

Sebastian



Bug#903005: stretch-pu: package clamav/0.100.0+dfsg-0+deb9u1

2018-07-04 Thread Adam D. Barratt
Control: tags -1 + confirmed

On Wed, 2018-07-04 at 23:53 +0200, Sebastian Andrzej Siewior wrote:
> 0.100.0 clamav version had a few config options removed. This is
> covered
> by postinst as long as the config is handled by debconf. If the user
> makes changes manually then ucf ask the user to resolve it and if
> nothing happens
> (during unattended-upgrades) then the old options remain set and
> clamav
> refuses to start.
> This was reported during the deb8 point upgrade. To avoid this during
> the upcomming deb9 upgrade I hereby propose a patch to simply declare
> the removed options as "deprecated" which results in a warning like
> > 

Please go ahead.

Regards,

Adam



Bug#903005: stretch-pu: package clamav/0.100.0+dfsg-0+deb9u1

2018-07-04 Thread Sebastian Andrzej Siewior
Package: release.debian.org
User: release.debian@packages.debian.org
Usertags: pu
Tags: stretch
Severity: normal

0.100.0 clamav version had a few config options removed. This is covered
by postinst as long as the config is handled by debconf. If the user
makes changes manually then ucf ask the user to resolve it and if nothing 
happens
(during unattended-upgrades) then the old options remain set and clamav
refuses to start.
This was reported during the deb8 point upgrade. To avoid this during
the upcomming deb9 upgrade I hereby propose a patch to simply declare
the removed options as "deprecated" which results in a warning like
| clamd[8720]: WARNING: Ignoring deprecated option StatsTimeout at line 88
| clamd[8720]: WARNING: Ignoring deprecated option StatsPEDisabled at line 89

in the log file and clamav continues.

In terms of full disclosure: There is a yara regression within clamav
(that is if you use clamav-unofficial-sigs) as reported in #902899
yesterday. The bug has been reported on 16th April to
clamav-unofficial-sigs upstream (as per the forwarded link in BTS) and
nothing happend since. Give the freeze this weekend I don't think that
this will change for Stretch.

Sebastian
diff -Nru clamav-0.100.0+dfsg/debian/changelog clamav-0.100.0+dfsg/debian/changelog
--- clamav-0.100.0+dfsg/debian/changelog	2018-04-25 21:59:49.0 +0200
+++ clamav-0.100.0+dfsg/debian/changelog	2018-07-04 23:14:43.0 +0200
@@ -1,3 +1,9 @@
+clamav (0.100.0+dfsg-0+deb9u2) stretch; urgency=medium
+
+  * Don't fail on recently removed config options (Closes: #902290).
+
+ -- Sebastian Andrzej Siewior   Wed, 04 Jul 2018 23:14:43 +0200
+
 clamav (0.100.0+dfsg-0+deb9u1) stretch; urgency=medium
 
   [ Sebastian Andrzej Siewior ]
diff -Nru clamav-0.100.0+dfsg/debian/.git-dpm clamav-0.100.0+dfsg/debian/.git-dpm
--- clamav-0.100.0+dfsg/debian/.git-dpm	2018-04-25 21:59:43.0 +0200
+++ clamav-0.100.0+dfsg/debian/.git-dpm	2018-07-04 22:11:57.0 +0200
@@ -1,6 +1,6 @@
 # see git-dpm(1) from git-dpm package
-7a040ad8b6aad81cd3b37661345727e43e3cd78a
-7a040ad8b6aad81cd3b37661345727e43e3cd78a
+e7d1d6e337cc5ecf533b991879c6374a71c0bf18
+e7d1d6e337cc5ecf533b991879c6374a71c0bf18
 c6bf3661e036ec9579e544d999438b0147e75315
 c6bf3661e036ec9579e544d999438b0147e75315
 clamav_0.100.0+dfsg.orig.tar.xz
diff -Nru clamav-0.100.0+dfsg/debian/patches/Deprecate-unused-options-instead-of-removing-it.patch clamav-0.100.0+dfsg/debian/patches/Deprecate-unused-options-instead-of-removing-it.patch
--- clamav-0.100.0+dfsg/debian/patches/Deprecate-unused-options-instead-of-removing-it.patch	1970-01-01 01:00:00.0 +0100
+++ clamav-0.100.0+dfsg/debian/patches/Deprecate-unused-options-instead-of-removing-it.patch	2018-07-04 22:11:57.0 +0200
@@ -0,0 +1,60 @@
+From e7d1d6e337cc5ecf533b991879c6374a71c0bf18 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior 
+Date: Wed, 4 Jul 2018 21:26:50 +0200
+Subject: Deprecate unused options instead of removing it
+
+The following options were removed:
+- StatsHostID
+- StatsEnabled
+- StatsPEDisabled
+- StatsTimeout
+- SubmitDetectionStats
+- DetectionStatsCountry
+- DetectionStatsHostID
+
+and if they remain in the config file (during automatic upgrade without
+user action which would be required by ucf) then clamav will refuse the
+start. By marking them as deprecated clamav will point it out and
+continue. This patch will be dropped by moving to next Debian stable
+version (the user is expected to edit the config manually at this
+point if it did not happen earlier).
+
+BTS: https://bugs.debian.org/902290
+Patch-Name: Deprecate-unused-options-instead-of-removing-it.patch
+Signed-off-by: Sebastian Andrzej Siewior 
+---
+ shared/optparser.c | 14 ++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/shared/optparser.c b/shared/optparser.c
+index b5a7208..7dea853 100644
+--- a/shared/optparser.c
 b/shared/optparser.c
+@@ -194,6 +194,14 @@ const struct clam_option __clam_options[] = {
+ 
+ { "LogFile", "log", 'l', CLOPT_TYPE_STRING, NULL, -1, NULL, 0, OPT_CLAMD | OPT_MILTER | OPT_CLAMSCAN | OPT_CLAMDSCAN, "Save all reports to a log file.", "/tmp/clamav.log" },
+ 
++{ "StatsHostID", "stats-host-id", 0, CLOPT_TYPE_STRING, NULL, -1, NULL, 0, OPT_FRESHCLAM | OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "HostID in the form of an UUID to use when submitting statistical information. See the clamscan manpage for more information.", "default" },
++
++{ "StatsEnabled", "enable-stats", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_CLAMSCAN | OPT_DEPRECATED, "Enable submission of statistical data", "yes" },
++
++{ "StatsPEDisabled", "disable-pe-stats", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "Disable submission of PE section statistical data", "no" },
++
++{ "StatsTimeout", "stats-timeout", 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, -1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_FRESHCLAM |