- Move pkgconfig stuff from main to devel package.

- Re-introduce removed options as deprecated, so that clamd and
  freshclam don't exit on startup with an old config file
  (clamav-obsolete-config.patch).

OBS-URL: https://build.opensuse.org/package/show/security/clamav?expand=0&rev=165
This commit is contained in:
Reinhard Max 2018-04-18 14:49:27 +00:00 committed by Git OBS Bridge
parent f9901db0ae
commit 365105a77e
3 changed files with 22 additions and 8 deletions

View File

@ -0,0 +1,16 @@
--- shared/optparser.c.orig
+++ shared/optparser.c
@@ -505,6 +505,13 @@ const struct clam_option __clam_options[
{ "ClamukoExcludeUID", NULL, 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD | OPT_DEPRECATED, "", "" },
{ "ClamukoMaxFileSize", NULL, 0, CLOPT_TYPE_SIZE, MATCH_SIZE, 5242880, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", "" },
{ "AllowSupplementaryGroups", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_MILTER | OPT_DEPRECATED, "Initialize a supplementary group access (the process must be started by root).", "no" },
+ { "StatsHostID", "stats-host-id", 0, CLOPT_TYPE_STRING, NULL, -1, NULL, 0, OPT_FRESHCLAM | OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "", "" },
+ { "StatsEnabled", "enable-stats", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_FRESHCLAM | OPT_CLAMSCAN | OPT_DEPRECATED, "", "" },
+ { "StatsPEDisabled", "disable-pe-stats", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "", "" },
+ { "StatsTimeout", "stats-timeout", 0, CLOPT_TYPE_NUMBER, MATCH_NUMBER, -1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_FRESHCLAM | OPT_DEPRECATED, "", "" },
+ { "SubmitDetectionStats", NULL, 0, CLOPT_TYPE_STRING, NULL, -1, NULL, 0, OPT_FRESHCLAM | OPT_DEPRECATED, "", "" },
+ { "DetectionStatsCountry", NULL, 0, CLOPT_TYPE_STRING, NULL, -1, NULL, 0, OPT_FRESHCLAM | OPT_DEPRECATED, "", "" },
+ { "DetectionStatsHostID", NULL, 0, CLOPT_TYPE_STRING, NULL, -1, NULL, 0, OPT_FRESHCLAM | OPT_DEPRECATED, "", "" },
/* Milter specific options */

View File

@ -32,9 +32,10 @@ Fri Apr 13 15:07:48 UTC 2018 - max@suse.com
* Obsoletes clamav-fix_newer_zlib.patch
- Update key ring and add signature file.
- Use system-wide LLVM instead of the deprecated bundled one.
- Move pkgconfig stuff the main to the devel package.
- On update, remove obsolete option SubmitDetectionStats from
/etc/freshclam.conf otherwise freshclam refuses to start.
- Move pkgconfig stuff from main to devel package.
- Re-introduce removed options as deprecated, so that clamd and
freshclam don't exit on startup with an old config file
(clamav-obsolete-config.patch).
-------------------------------------------------------------------
Wed Mar 7 13:15:11 UTC 2018 - max@suse.com

View File

@ -57,6 +57,7 @@ Source8: service.freshclam
Source9: service.clamav-milter
Patch1: clamav-conf.patch
Patch4: clamav-disable-timestamps.patch
Patch5: clamav-obsolete-config.patch
BuildRequires: systemd
BuildRequires: systemd-rpm-macros
%systemd_requires
@ -95,6 +96,7 @@ that want to make use of libclamav.
%setup -q
%patch1
%patch4
%patch5
%build
CFLAGS="-fstack-protector"
@ -199,11 +201,6 @@ getent passwd vscan >/dev/null || \
%post
systemd-tmpfiles --create %_tmpfilesdir/clamav.conf
%service_add_post clamd.service freshclam.service clamav-milter.service
test $1 -eq 2 &&
# If upgrading, comment out obsolete config file options
# https://bugzilla.clamav.net/show_bug.cgi?id=12097
grep -q '^[[:space:]]*SubmitDetectionStats' /etc/freshclam.conf &&
sed -i '/^[[:space:]]*SubmitDetectionStats/s/^/\# OBSOLETE: /' /etc/freshclam.conf ||:
%preun
%service_del_preun clamd.service freshclam.service clamav-milter.service