The package rpms/clamav.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/clamav.git/commit/?id=58b63a7ac45....
Change:
+%ifnarch ppc64
Thanks.
Full change:
============
commit 8ca48f4eef7f7a86a8082e022f7e894e82017899
Merge: 7b491c4 f76b739
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Tue May 29 03:05:26 2018 +0200
Merge branch 'f27' of
ssh://pkgs.fedoraproject.org/clamav into f27
Conflicts:
clamav.spec
sources
commit 7b491c4ecfc1992b00b3776c6694c1073cb8a122
Author: Robert Scheck <robert(a)fedoraproject.org>
Date: Tue May 29 02:43:26 2018 +0200
Upgrade to 0.100.0 (#1565381)
diff --git a/.gitignore b/.gitignore
index 0c8b00b..7ed1b8e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
/clamav-*-norar.tar.xz
/main*.cvd
/daily*.cvd
-/bytecode-278.cvd
-/bytecode-319.cvd
+/bytecode*.cvd
diff --git a/clamav-0.100.0-stats-deprecation.patch
b/clamav-0.100.0-stats-deprecation.patch
new file mode 100644
index 0000000..16f81d2
--- /dev/null
+++ b/clamav-0.100.0-stats-deprecation.patch
@@ -0,0 +1,18 @@
+https://bugzilla.clamav.net/show_bug.cgi?id=12097
+
+--- shared/optparser.c
++++ 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 */
+
diff --git a/clamav-0.100.0-umask.patch b/clamav-0.100.0-umask.patch
new file mode 100644
index 0000000..0e7c6ec
--- /dev/null
+++ b/clamav-0.100.0-umask.patch
@@ -0,0 +1,33 @@
+--- clamav-0.100.0/clamav-milter/clamav-milter.c 2018-04-04 02:13:58.000000000 +0200
++++ clamav-0.100.0/clamav-milter/clamav-milter.c.umask 2018-05-28 23:25:12.374047156
+0200
+@@ -432,7 +432,7 @@
+
+ if((opt = optget(opts, "PidFile"))->enabled) {
+ FILE *fd;
+- mode_t old_umask = umask(0002);
++ mode_t old_umask = umask(0022);
+
+ if((fd = fopen(opt->strarg, "w")) == NULL) {
+ logg("!Can't save PID in file %s\n", opt->strarg);
+--- clamav-0.100.0/shared/output.c 2018-04-04 02:13:58.000000000 +0200
++++ clamav-0.100.0/shared/output.c.umask 2018-05-28 23:24:41.968851516 +0200
+@@ -379,7 +379,7 @@
+
+ if (!logg_fp && logg_file)
+ {
+- old_umask = umask(0037);
++ old_umask = umask(0077);
+ if ((logg_fp = fopen(logg_file, "at")) == NULL)
+ {
+ umask(old_umask);
+--- clamav-0.100.0/freshclam/freshclam.c 2018-04-04 02:13:58.000000000 +0200
++++ clamav-0.100.0/freshclam/freshclam.c.umask 2018-05-28 23:25:30.675164850 +0200
+@@ -127,7 +127,7 @@
+ {
+ FILE *fd;
+ int old_umask;
+- old_umask = umask (0006);
++ old_umask = umask (0022);
+ if ((fd = fopen (pidfile, "w")) == NULL)
+ {
+ logg ("!Can't save PID to file %s: %s\n", pidfile, strerror
(errno));
diff --git a/clamav-0.98-umask.patch b/clamav-0.98-umask.patch
deleted file mode 100644
index b9aa421..0000000
--- a/clamav-0.98-umask.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- clamav-0.98/clamav-milter/clamav-milter.c 2013-09-16 21:28:14.000000000 +0200
-+++ clamav-0.98/clamav-milter/clamav-milter.c.umask 2013-10-06 20:39:08.000000000 +0200
-@@ -374,7 +374,7 @@
-
- if((opt = optget(opts, "PidFile"))->enabled) {
- FILE *fd;
-- mode_t old_umask = umask(0002);
-+ mode_t old_umask = umask(0022);
-
- if((fd = fopen(opt->strarg, "w")) == NULL) {
- logg("!Can't save PID in file %s\n", opt->strarg);
---- clamav-0.98/shared/output.c 2013-09-16 21:28:14.000000000 +0200
-+++ clamav-0.98/shared/output.c.umask 2013-10-06 20:39:28.000000000 +0200
-@@ -348,7 +348,7 @@
- logg_open();
-
- if(!logg_fp && logg_file) {
-- old_umask = umask(0037);
-+ old_umask = umask(0077);
- if((logg_fp = fopen(logg_file, "at")) == NULL) {
- umask(old_umask);
- #ifdef CL_THREAD_SAFE
---- clamav-0.98/freshclam/freshclam.c 2013-09-16 21:28:14.000000000 +0200
-+++ clamav-0.98/freshclam/freshclam.c.umask 2013-10-06 20:39:47.000000000 +0200
-@@ -123,7 +123,7 @@
- {
- FILE *fd;
- int old_umask;
-- old_umask = umask (0006);
-+ old_umask = umask (0022);
- if ((fd = fopen (pidfile, "w")) == NULL)
- {
- logg ("!Can't save PID to file %s: %s\n", pidfile, strerror
(errno));
diff --git a/clamav.spec b/clamav.spec
index a303ca9..4e7ab72 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -61,14 +61,14 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.99.4
-Release: 3%{?dist}
+Version: 0.100.0
+Release: 1%{?dist}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
-URL:
http://www.clamav.net
+URL:
https://www.clamav.net/
%if %{with unrar}
-Source0:
http://www.clamav.net/downloads/production/%name-%version%{?prerelease}.t...
-Source999:
http://www.clamav.net/downloads/production/%name-%version%{?prerelease}.t...
+Source0:
https://www.clamav.net/downloads/production/%name-%version%{?prerelease}....
+Source999:
https://www.clamav.net/downloads/production/%name-%version%{?prerelease}....
%else
# Unfortunately, clamav includes support for RAR v3, derived from GPL
# incompatible unrar from RARlabs. We have to pull this code out.
@@ -81,12 +81,12 @@ Source2: clamd.sysconfig
Source3: clamd.logrotate
Source5: clamd-README
Source7: clamd.SERVICE.init
-# To download the *.cvd, go to
http://www.clamav.net and use the links
+# To download the *.cvd, go to
https://www.clamav.net and use the links
# there (I renamed the files to add the -version suffix for verifying).
# Check the first line of the file for version, file is not working
# see
https://bugzilla.redhat.com/show_bug.cgi?id=1539107
Source10:
http://db.local.clamav.net/main-58.cvd
-Source11:
http://db.local.clamav.net/daily-24356.cvd
+Source11:
http://db.local.clamav.net/daily-24611.cvd
Source12:
http://db.local.clamav.net/bytecode-319.cvd
#for devel
Source100: clamd-gen
@@ -112,15 +112,16 @@ Source520: clamd-wrapper
#for server-systemd
Source530: clamd@.service
+Patch0: clamav-0.100.0-stats-deprecation.patch
Patch24: clamav-0.99-private.patch
-Patch27: clamav-0.98-umask.patch
+Patch27: clamav-0.100.0-umask.patch
#
https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/I...
Patch30: llvm-glibc.patch
Patch31: clamav-0.99.1-setsebool.patch
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
-BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
+BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel json-c-devel
BuildRequires: ncurses-devel openssl-devel libxml2-devel
BuildRequires: pcre2-devel
#BuildRequires: %_includedir/tcpd.h
@@ -170,6 +171,7 @@ user-creation scripts required by clamav.
Summary: Dynamic libraries for the Clam Antivirus scanner
Group: System Environment/Libraries
Requires: data(clamav)
+Provides: bundled(libmspack) = 0.5-0.1.alpha.modified_by_clamav
%description lib
This package contains dynamic libraries shared between applications
@@ -358,6 +360,7 @@ This package contains files which are needed to run the
clamav-milter.
%prep
%setup -q -n %{name}-%{version}%{?prerelease}
+%apply -n0 -p0 -b .stats-deprecation
%apply -n24 -p1 -b .private
%apply -n27 -p1 -b .umask
%apply -n30 -p1
@@ -690,7 +693,6 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
%files
-%doc AUTHORS BUGS COPYING ChangeLog FAQ NEWS README UPGRADE
%doc docs/*.pdf
%_bindir/*
%_mandir/man[15]/*
@@ -814,6 +816,9 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
%changelog
+* Mon May 28 2018 Robert Scheck <robert(a)fedoraproject.org> - 0.100.0-1
+- Upgrade to 0.100.0 (#1565381)
+
* Wed Mar 21 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.4-3
- Fix data-empty sub-package (ghost the correct files)
- Add Obsoletes systemd sub-packages
diff --git a/sources b/sources
index 5c96ba6..341de17 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (clamav-0.99.4-norar.tar.xz) =
c947d4626b210fe92bf6b287b038c4af26346f5e392d4a5b6c5e535fa805c0f72b38875fe87960539d4b859bf9fd478ce798fc6b33f44b94ee23ee7c430932a9
+SHA512 (clamav-0.100.0-norar.tar.xz) =
ecb6602f746f570481cf8df396fe60853be73b0b01adff17a6ef50a1db285f1f26947a9d63981631b6f809188e4752632fba148ef77c46be6a7d4480b12a2649
SHA512 (bytecode-319.cvd) =
1b2785fde078e0dae5a4b8a5161a0da55b26b010deda9fd9dc5edb7113d46d6eb45f644c16b4cb3882e7192d0b389d7b1826fbb718377aa40e1bac3485829acc
-SHA512 (daily-24356.cvd) =
0550e4d136189dfd6fd78e027fb81713530abeaee47d48a678ed4a521114cae87fc0500a0f8eaa7e4ba1f8ed8ecd5159f96cd0b62eac92491acfcc01f9277973
+SHA512 (daily-24611.cvd) =
109bca93329b5be740f4e3916dcf5c2f01b99593711a55ed9502e764d3b7aefab8735d05864749ae5a133b32f2f9112f56dfdea4fbadc6cfd945c7f3fd2bd2da
SHA512 (main-58.cvd) =
71309a7ea26f0fbfe329252c728173c895b107b7ea2e0bd613b12475db1d0270a496d707c4d80c842bf8b6f21680e86edfa7fa3b8aea075e93d67c91d696603a
commit 76a1c6b58ee86544cce43b60289a172946e1bc16
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Wed Mar 21 18:17:03 2018 +0000
Update README.fedora
diff --git a/README.fedora b/README.fedora
index 8df192d..7abd190 100644
--- a/README.fedora
+++ b/README.fedora
@@ -1,3 +1,6 @@
+Please note since el7 and Fedora 15 or 19 we use only systemd.
+upstart and sysv was dropped, this document may still applies to el6.
+
A clamav-milter setup consists of the following three components:
* the clamav-milter itself
commit 0b7392939e0dc4d79c7efbe565cca395c3ba9240
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Wed Mar 21 18:10:44 2018 +0000
More fixes in data-empty sub-package
Don't ghost any file, ghost files of *.cld are laready in clamav-update
sub-package
With data-empty require clamav-update.
diff --git a/clamav.spec b/clamav.spec
index e192f81..a303ca9 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -192,7 +192,6 @@ build applications using clamav.
Summary: Virus signature data for the Clam Antivirus scanner
Group: Applications/File
Requires: clamav-filesystem = %version-%release
-Requires: clamav-filesystem = %version-%release
Provides: data(clamav) = full
Conflicts: data(clamav) < full
Conflicts: data(clamav) > full
@@ -217,6 +216,8 @@ definitions.
%package data-empty
Summary: Empty data package for the Clam Antivirus scanner
Group: Applications/File
+Requires: clamav-filesystem = %version-%release
+Requires: clamav-update = %version-%release
Provides: data(clamav) = empty
Conflicts: data(clamav) < empty
Conflicts: data(clamav) > empty
@@ -731,9 +732,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
%files data-empty
-%defattr(-,%updateuser,%updateuser,-)
-%ghost %attr(0664,%updateuser,%updateuser) %homedir/*.cld
-
+# empty, ghostfiles of *.cld are in update sub-package
## -----------------------
commit 5e34a1f23decae331b3e714181fc13329375ff1f
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Wed Mar 21 04:55:29 2018 +0000
Add Obsoletes systemd sub-packages
diff --git a/clamav.spec b/clamav.spec
index d0268b2..e192f81 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -286,7 +286,11 @@ Provides: clamav-scanner-upstart = %version-%release
%endif
Obsoletes: clamav-scanner-upstart < %version-%release
%if %{with systemd}
+Provides: clamav-scanner-systemd = %{version}-%{release}
+Provides: clamav-server-systemd = %{version}-%{release}
%endif
+Obsoletes: clamav-scanner-systemd < %{version}-%{release}
+Obsoletes: clamav-server-systemd < %{version}-%{release}
### Fedora Extras introduced them differently :(
Provides: clamav-server = %{version}-%{release}
@@ -340,6 +344,10 @@ Requires(preun): /sbin/initctl
Provides: clamav-milter-upstart = %version-%release
%endif
Obsoletes: clamav-milter-upstart < %version-%release
+%if %{with systemd}
+Provides: clamav-milter-systemd = %{version}-%{release}
+%endif
+Obsoletes: clamav-milter-systemd < %{version}-%{release}
%description milter
This package contains files which are needed to run the clamav-milter.
@@ -809,6 +817,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
%changelog
* Wed Mar 21 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.4-3
- Fix data-empty sub-package (ghost the correct files)
+- Add Obsoletes systemd sub-packages
* Mon Mar 12 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.4-2
- Revert fix for llvm, build using -std=gnu++98 (#1307378)
commit abc6c60342dd19af9243d2ef3b7e7dbd8e90b8ef
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Wed Mar 21 03:43:31 2018 +0000
Fix data-empty sub-package (ghost the correct files)
diff --git a/clamav.spec b/clamav.spec
index 84e8073..d0268b2 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -62,7 +62,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.99.4
-Release: 2%{?dist}
+Release: 3%{?dist}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
URL:
http://www.clamav.net
@@ -724,7 +724,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
%files data-empty
%defattr(-,%updateuser,%updateuser,-)
-%ghost %attr(0664,%updateuser,%updateuser) %homedir/*.cvd
+%ghost %attr(0664,%updateuser,%updateuser) %homedir/*.cld
## -----------------------
@@ -807,6 +807,9 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
%changelog
+* Wed Mar 21 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.4-3
+- Fix data-empty sub-package (ghost the correct files)
+
* Mon Mar 12 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.4-2
- Revert fix for llvm, build using -std=gnu++98 (#1307378)
- Revert CFLAG assignment in commmit a4a6d252 (made in 2006)
commit 58b63a7ac45b150b4689ef6ae036e16a4a7780b9
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Mon Mar 12 05:11:28 2018 +0000
Disable llvm in ppc64 (#1534071)
From [1] "Disable llvm will use the internal bytecode interpreter rather than the
llvm
jit", so drop bytecode build condition and use condional on enable or disable
llvm.
[1]
http://lists.clamav.net/pipermail/clamav-users/2017-May/004572.html
diff --git a/clamav.spec b/clamav.spec
index 9ded5de..84e8073 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -22,7 +22,12 @@
%endif
%bcond_with unrar
%bcond_without noarch
-%bcond_without bytecode
+%ifnarch ppc64
+%bcond_without llvm
+%else
+%bcond_with llvm
+%endif
+
##
%global _hardened_build 1
@@ -119,10 +124,8 @@ BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
BuildRequires: ncurses-devel openssl-devel libxml2-devel
BuildRequires: pcre2-devel
#BuildRequires: %_includedir/tcpd.h
-%{?with_bytecode:BuildRequires: bc tcl groff graphviz}
-%if %{have_ocaml}
-%{?with_bytecode:BuildRequires: ocaml}
-%endif
+BuildRequires: bc tcl groff graphviz
+%{?have_ocaml:BuildRequires: ocaml}
# nc reuqired for tests
BuildRequires: nc
%if %{with systemd}
@@ -399,7 +402,7 @@ autoreconf -i
--disable-rpath \
--disable-silent-rules \
--enable-clamdtop \
- %{!?with_bytecode:--disable-llvm}
+ %{!?with_llvm:--disable-llvm}
# TODO: check periodically that CLAMAVUSER is used for freshclam only
@@ -448,13 +451,12 @@ rm -f $RPM_BUILD_ROOT%_sysconfdir/clamd.conf.sample \
$RPM_BUILD_ROOT%_libdir/*.la
-%{?with_bytecode:touch $RPM_BUILD_ROOT%homedir/bytecode.cld}
-touch $RPM_BUILD_ROOT%homedir/{daily,main}.cld
+touch $RPM_BUILD_ROOT%homedir/{daily,main,bytecode}.cld
touch $RPM_BUILD_ROOT%homedir/mirrors.dat
install -D -m 0644 -p %SOURCE10 $RPM_BUILD_ROOT%homedir/main.cvd
install -D -m 0644 -p %SOURCE11 $RPM_BUILD_ROOT%homedir/daily.cvd
-%{?with_bytecode:install -D -m 0644 -p %SOURCE12
$RPM_BUILD_ROOT%homedir/bytecode.cvd}
+install -D -m 0644 -p %SOURCE12 $RPM_BUILD_ROOT%homedir/bytecode.cvd
## prepare the server-files
install -D -m 0644 -p %SOURCE2 _doc_server/clamd.sysconfig
@@ -809,6 +811,10 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
- Revert fix for llvm, build using -std=gnu++98 (#1307378)
- Revert CFLAG assignment in commmit a4a6d252 (made in 2006)
- BR systemd-devel to fix detection in configure.
+- Disable llvm in ppc64 (#1534071)
+- "Disable llvm will use the internal bytecode interpreter rather than the llvm
+ jit", so drop bytecode build condition and use condional on enable or disable
+ llvm.
* Fri Mar 02 2018 Orion Poplawski <orion(a)nwra.com> - 0.99.4-1
- Update to 0.99.4
commit ab5a44591db0d4fd8293dd53e13bc2f2811aff4f
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Mon Mar 12 04:32:01 2018 +0000
Revert fix for llvm, build using -std=gnu++98 (#1307378)
Revert CFLAG assignment in commmit a4a6d252 (made in 2006)
BR systemd-devel to fix detection in configure.
diff --git a/clamav.spec b/clamav.spec
index 828a236..9ded5de 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -57,7 +57,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.99.4
-Release: 1%{?dist}
+Release: 2%{?dist}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
URL:
http://www.clamav.net
@@ -127,7 +127,7 @@ BuildRequires: pcre2-devel
BuildRequires: nc
%if %{with systemd}
%{?systemd_requires}
-BuildRequires: systemd
+BuildRequires: systemd-devel
%endif
#for milter
BuildRequires: sendmail-devel
@@ -376,8 +376,8 @@ sed -ri \
## ------------------------------------------------------------
%build
-CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations
-std=gnu99"
-CXXFLAGS="$RPM_OPT_FLAGS -std=gnu++98"
+#CFLAGS="$RPM_OPT_FLAGS -Wall -W -Wmissing-prototypes -Wmissing-declarations
-std=gnu99"
+#CXXFLAGS="$RPM_OPT_FLAGS -std=gnu++98"
export LDFLAGS='%{?__global_ldflags} -Wl,--as-needed'
# IPv6 check is buggy and does not work when there are no IPv6 interface on build
machine
export have_cv_ipv6=yes
@@ -805,13 +805,18 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
%changelog
+* Mon Mar 12 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.4-2
+- Revert fix for llvm, build using -std=gnu++98 (#1307378)
+- Revert CFLAG assignment in commmit a4a6d252 (made in 2006)
+- BR systemd-devel to fix detection in configure.
+
* Fri Mar 02 2018 Orion Poplawski <orion(a)nwra.com> - 0.99.4-1
- Update to 0.99.4
- Security fixes CVE-2012-6706 CVE-2017-6419 CVE-2017-11423 CVE-2018-1000085
CVE-2018-0202
* Tue Feb 13 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.3-7
-- Remove sub-packages , sysvinit , upstart, systemd to be more compatible with
+- Remove sub-packages sysvinit, upstart and systemd to be more compatible with
el6 .
- Remove provides/obsoletes for very old sub-packges clamav-milter-core,
clamav-milter-sendmail and clamav-milter-core
commit e25f69a9fe694e5dcf770271acef99ea765df6c5
Author: Orion Poplawski <orion(a)nwra.com>
Date: Fri Mar 2 09:45:24 2018 -0700
Update to 0.99.4
Security fixes CVE-2012-6706 CVE-2017-6419 CVE-2017-11423 CVE-2018-1000085
CVE-2018-0202
diff --git a/clamav-0.99.2-temp-cleanup.patch b/clamav-0.99.2-temp-cleanup.patch
deleted file mode 100644
index 1b01341..0000000
--- a/clamav-0.99.2-temp-cleanup.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-https://github.com/vrtadmin/clamav-devel/commit/f5bc94cf01e6a19d5255c0e5f9a5bc2336f5a2b1
-backported (re-merge). See also:
-
- -
https://bugzilla.clamav.net/show_bug.cgi?id=11549
- -
https://github.com/e2guardian/e2guardian/issues/159
-
---- clamav-0.99.2/libclamav/scanners.c 2016-04-22 17:02:19.000000000 +0200
-+++ clamav-0.99.2/libclamav/scanners.c.temp-cleanup 2017-11-17 00:59:14.295670694 +0100
-@@ -1342,37 +1342,33 @@
- return CL_CLEAN;
- }
-
-- /* dump to disk only if explicitly asked to
-- * or if necessary to check relative offsets,
-- * otherwise we can process just in-memory */
-- if(ctx->engine->keeptmp || (troot && troot->ac_reloff_num > 0)) {
-- if((ret = cli_gentempfd(ctx->engine->tmpdir, &tmpname, &ofd))) {
-- cli_dbgmsg("cli_scanscript: Can't generate temporary
file/descriptor\n");
-- return ret;
-- }
-- if (ctx->engine->keeptmp)
-- cli_dbgmsg("cli_scanscript: saving normalized file to %s\n", tmpname);
-- }
--
- if(!(normalized = cli_malloc(SCANBUFF + maxpatlen))) {
- cli_dbgmsg("cli_scanscript: Unable to malloc %u bytes\n", SCANBUFF);
-- free(tmpname);
- return CL_EMEM;
- }
--
- text_normalize_init(&state, normalized, SCANBUFF + maxpatlen);
-- ret = CL_CLEAN;
--
-
- if ((ret = cli_ac_initdata(&tmdata, troot?troot->ac_partsigs:0,
troot?troot->ac_lsigs:0, troot?troot->ac_reloff_num:0, CLI_DEFAULT_AC_TRACKLEN))) {
-- free(tmpname);
-- return ret;
-+ free(normalized);
-+ return ret;
- }
-
- if ((ret = cli_ac_initdata(&gmdata, groot->ac_partsigs, groot->ac_lsigs,
groot->ac_reloff_num, CLI_DEFAULT_AC_TRACKLEN))) {
-- cli_ac_freedata(&tmdata);
-- free(tmpname);
-- return ret;
-+ cli_ac_freedata(&tmdata);
-+ free(normalized);
-+ return ret;
-+ }
-+
-+ /* dump to disk only if explicitly asked to
-+ * or if necessary to check relative offsets,
-+ * otherwise we can process just in-memory */
-+ if(ctx->engine->keeptmp || (troot && troot->ac_reloff_num > 0)) {
-+ if((ret = cli_gentempfd(ctx->engine->tmpdir, &tmpname, &ofd)))
{
-+ cli_dbgmsg("cli_scanscript: Can't generate temporary
file/descriptor\n");
-+ goto done;
-+ }
-+ if (ctx->engine->keeptmp)
-+ cli_dbgmsg("cli_scanscript: saving normalized file to %s\n",
tmpname);
- }
-
- mdata[0] = &tmdata;
-@@ -1387,10 +1383,9 @@
- map_off += written;
-
- if (write(ofd, state.out, state.out_pos) == -1) {
-- cli_errmsg("cli_scanscript: can't write to file %s\n",tmpname);
-- close(ofd);
-- free(tmpname);
-- return CL_EWRITE;
-+ cli_errmsg("cli_scanscript: can't write to file
%s\n",tmpname);
-+ ret = CL_EWRITE;
-+ goto done;
- }
- text_normalize_reset(&state);
- }
-@@ -1409,11 +1404,6 @@
- funmap(*ctx->fmap);
- }
- *ctx->fmap = map;
--
-- /* If we aren't keeping temps, delete the normalized file after scan. */
-- if(!(ctx->engine->keeptmp))
-- if (cli_unlink(tmpname)) ret = CL_EUNLINK;
--
- } else {
- /* Since the above is moderately costly all in all,
- * do the old stuff if there's no relative offsets. */
-@@ -1421,11 +1411,8 @@
- if (troot) {
- cli_targetinfo(&info, 7, map);
- ret = cli_ac_caloff(troot, &tmdata, &info);
-- if (ret) {
-- cli_ac_freedata(&tmdata);
-- free(tmpname);
-- return ret;
-- }
-+ if (ret)
-+ goto done;
- }
-
- while(1) {
-@@ -1466,13 +1453,6 @@
-
- }
-
-- if(ctx->engine->keeptmp) {
-- free(tmpname);
-- if (ofd >= 0)
-- close(ofd);
-- }
-- free(normalized);
--
- if(ret != CL_VIRUS || SCAN_ALL) {
- if ((ret = cli_exp_eval(ctx, troot, &tmdata, NULL, NULL)) == CL_VIRUS)
- viruses_found++;
-@@ -1481,9 +1461,19 @@
- viruses_found++;
- }
-
-+done:
-+ free(normalized);
- cli_ac_freedata(&tmdata);
- cli_ac_freedata(&gmdata);
-
-+ if (ofd != -1)
-+ close(ofd);
-+ if (tmpname != NULL) {
-+ if (!ctx->engine->keeptmp)
-+ cli_unlink(tmpname);
-+ free(tmpname);
-+ }
-+
- if (SCAN_ALL && viruses_found)
- return CL_VIRUS;
-
diff --git a/clamav.spec b/clamav.spec
index c8b0b17..828a236 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -56,14 +56,14 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
-Version: 0.99.3
-Release: 7%{?dist}
+Version: 0.99.4
+Release: 1%{?dist}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
URL:
http://www.clamav.net
%if %{with unrar}
-Source0:
http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prere...
-Source999:
http://download.sourceforge.net/sourceforge/clamav/%name-%version%{?prere...
+Source0:
http://www.clamav.net/downloads/production/%name-%version%{?prerelease}.t...
+Source999:
http://www.clamav.net/downloads/production/%name-%version%{?prerelease}.t...
%else
# Unfortunately, clamav includes support for RAR v3, derived from GPL
# incompatible unrar from RARlabs. We have to pull this code out.
@@ -81,7 +81,7 @@ Source7: clamd.SERVICE.init
# Check the first line of the file for version, file is not working
# see
https://bugzilla.redhat.com/show_bug.cgi?id=1539107
Source10:
http://db.local.clamav.net/main-58.cvd
-Source11:
http://db.local.clamav.net/daily-24253.cvd
+Source11:
http://db.local.clamav.net/daily-24356.cvd
Source12:
http://db.local.clamav.net/bytecode-319.cvd
#for devel
Source100: clamd-gen
@@ -112,7 +112,6 @@ Patch27: clamav-0.98-umask.patch
#
https://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/I...
Patch30: llvm-glibc.patch
Patch31: clamav-0.99.1-setsebool.patch
-Patch33: clamav-0.99.2-temp-cleanup.patch
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
@@ -351,7 +350,6 @@ This package contains files which are needed to run the
clamav-milter.
%apply -n27 -p1 -b .umask
%apply -n30 -p1
%apply -n31 -p1 -b .setsebool
-%apply -n33 -p1 -b .temp-cleanup
%{?apply_end}
install -p -m0644 %SOURCE300 clamav-milter/
@@ -807,6 +805,11 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
%changelog
+* Fri Mar 02 2018 Orion Poplawski <orion(a)nwra.com> - 0.99.4-1
+- Update to 0.99.4
+- Security fixes CVE-2012-6706 CVE-2017-6419 CVE-2017-11423 CVE-2018-1000085
+ CVE-2018-0202
+
* Tue Feb 13 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.3-7
- Remove sub-packages , sysvinit , upstart, systemd to be more compatible with
el6 .
diff --git a/sources b/sources
index 113ca26..5c96ba6 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,4 @@
-SHA512 (clamav-0.99.3-norar.tar.xz) =
d80b20c982d35eecd2719af325bc774a5a5fe63a97f3d855c74919f6cfac6fe3f12c51479e49d96031ae0e9a3dedcf446dd22426cceba22ec4b641e9ea1f250a
+SHA512 (clamav-0.99.4-norar.tar.xz) =
c947d4626b210fe92bf6b287b038c4af26346f5e392d4a5b6c5e535fa805c0f72b38875fe87960539d4b859bf9fd478ce798fc6b33f44b94ee23ee7c430932a9
SHA512 (bytecode-319.cvd) =
1b2785fde078e0dae5a4b8a5161a0da55b26b010deda9fd9dc5edb7113d46d6eb45f644c16b4cb3882e7192d0b389d7b1826fbb718377aa40e1bac3485829acc
-SHA512 (daily-24253.cvd) =
cef70a86f7989ec330c0479f6070e735181168c0331e981cfcd8d9a5aebdd6be42d772167c701f6f33219a4b41aced806e70c156e9a2a060c30ba55e73743fcd
+SHA512 (daily-24356.cvd) =
0550e4d136189dfd6fd78e027fb81713530abeaee47d48a678ed4a521114cae87fc0500a0f8eaa7e4ba1f8ed8ecd5159f96cd0b62eac92491acfcc01f9277973
SHA512 (main-58.cvd) =
71309a7ea26f0fbfe329252c728173c895b107b7ea2e0bd613b12475db1d0270a496d707c4d80c842bf8b6f21680e86edfa7fa3b8aea075e93d67c91d696603a
commit 083b73de65ddddc5fe15d8b327d18d06296f9e20
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Wed Feb 14 04:28:06 2018 +0000
Explicitly enable-id-check and enable-dns
in configure (as in el6).
diff --git a/clamav.spec b/clamav.spec
index 26eec35..c8b0b17 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -392,8 +392,8 @@ autoreconf -i
--disable-static \
--disable-zlib-vcheck \
%{!?with_unrar:--disable-unrar} \
- --enable-id-check \
- --enable-dns \
+ --enable-id-check \
+ --enable-dns \
--with-dbdir=%homedir \
--with-group=%updateuser \
--with-libcurl=%{_prefix} \
@@ -815,6 +815,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
- Call server and scanner sub-packages as clamd (el6 compatible and as uppstream
call it)
- clamav-data provides clamav-db (el6 compatible)
+- Explicitly enable-id-check and enable-dns in configure (as in el6).
- Add missing build-time requirement pcre2-devel (it misses in el6 at least)
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain(a)fedoraproject.org> - 0.99.3-6
commit f73374371acb33fcccfad5d2df915b362cdafcf5
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Wed Feb 14 04:21:41 2018 +0000
Release still 7
diff --git a/clamav.spec b/clamav.spec
index 70721a4..26eec35 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -57,7 +57,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.99.3
-Release: 8%{?dist}
+Release: 7%{?dist}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
URL:
http://www.clamav.net
commit 9f236452b6a072b8545a0e498962985377aab2f6
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Wed Feb 14 04:17:47 2018 +0000
Add missing build-time requirement pcre2-devel
diff --git a/clamav.spec b/clamav.spec
index 49a8c80..70721a4 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -118,7 +118,7 @@ Patch33: clamav-0.99.2-temp-cleanup.patch
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
BuildRequires: ncurses-devel openssl-devel libxml2-devel
-BuildRequires: pcre-devel
+BuildRequires: pcre2-devel
#BuildRequires: %_includedir/tcpd.h
%{?with_bytecode:BuildRequires: bc tcl groff graphviz}
%if %{have_ocaml}
@@ -815,7 +815,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
- Call server and scanner sub-packages as clamd (el6 compatible and as uppstream
call it)
- clamav-data provides clamav-db (el6 compatible)
-- Added missing build-time requirement to pcre-devel
+- Add missing build-time requirement pcre2-devel (it misses in el6 at least)
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain(a)fedoraproject.org> - 0.99.3-6
- Escape macros in %%changelog
commit 3fb039a126a281cc3f2912d6e8f3f77bde11a16c
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Wed Feb 14 04:10:16 2018 +0000
Added missing build-time requirement to pcre-devel
diff --git a/clamav.spec b/clamav.spec
index 422a53c..49a8c80 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -57,7 +57,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.99.3
-Release: 7%{?dist}
+Release: 8%{?dist}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
URL:
http://www.clamav.net
@@ -118,6 +118,7 @@ Patch33: clamav-0.99.2-temp-cleanup.patch
BuildRequires: autoconf automake gettext-devel libtool libtool-ltdl-devel
BuildRequires: zlib-devel bzip2-devel gmp-devel curl-devel
BuildRequires: ncurses-devel openssl-devel libxml2-devel
+BuildRequires: pcre-devel
#BuildRequires: %_includedir/tcpd.h
%{?with_bytecode:BuildRequires: bc tcl groff graphviz}
%if %{have_ocaml}
@@ -814,6 +815,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
- Call server and scanner sub-packages as clamd (el6 compatible and as uppstream
call it)
- clamav-data provides clamav-db (el6 compatible)
+- Added missing build-time requirement to pcre-devel
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain(a)fedoraproject.org> - 0.99.3-6
- Escape macros in %%changelog
commit 1977bdfb2137ec56517f4eb780f03ac680b852ec
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Wed Feb 14 03:26:03 2018 +0000
Call server and scanner sub-packages as clamd
(el6 compatible and as uppstream call it)
clamav-data provides clamav-db (el6 compatible)
diff --git a/clamav.spec b/clamav.spec
index 242c52b..422a53c 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -193,6 +193,8 @@ Requires: clamav-filesystem = %version-%release
Provides: data(clamav) = full
Conflicts: data(clamav) < full
Conflicts: data(clamav) > full
+Provides: clamav-db = %{version}-%{release}
+Obsoletes: clamav-db < %{version}-%{release}
%{?noarch}
%description data
@@ -245,48 +247,26 @@ anti-virus database automatically. It uses the freshclam(1) utility
for
this task. To activate it, uncomment the entry in /etc/cron.d/clamav-update.
-%package server
-Summary: Clam Antivirus scanner server
-Group: System Environment/Daemons
+%package -n clamd
+Summary: The Clam AntiVirus Daemon
+Group: System Environment/Daemons
Requires: data(clamav)
Requires: clamav-filesystem = %version-%release
Requires: clamav-lib = %version-%release
Requires: coreutils
%if %{with sysv}
Requires: %_initrddir
-Provides: init(clamav-server) = sysv
Provides: clamav-server-sysvinit = %version-%release
%endif
Obsoletes: clamav-server-sysvinit < %version-%release
%if %{with systemd}
-Provides: init(clamav-server) = systemd
%endif
-
-%description server
-ATTENTION: most users do not need this package; the main package has
-everything (or depends on it) which is needed to scan for virii on
-workstations.
-
-This package contains files which are needed to execute the clamd-daemon.
-This daemon does not provide a system-wide service. Instead of, an instance
-of this daemon should be started for each service requiring it.
-
-See the README file how this can be done with a minimum of effort.
-
-
-%package scanner
-Summary: Clamav scanner daemon
-Group: System Environment/Daemons
-Requires: init(clamav-scanner)
Provides: user(%scanuser) = 49
Provides: group(%scanuser) = 49
-Requires: clamav-server = %version-%release
Requires(pre): shadow-utils
Requires(pre): group(virusgroup)
%if %{with sysv}
# Remove me after EOL of RHEL5
-Provides: init(clamav-scanner) = sysv
-Requires: clamav-server-sysvinit = %version-%release
Requires: %_initrddir
Requires(postun): initscripts
Requires(post): chkconfig
@@ -296,7 +276,6 @@ Obsoletes: clamav-scanner-sysvinit < %version-%release
%endif
%if %{with upstart}
# Remove me after EOL of RHEL6
-Provides: init(clamav-scanner) = upstart
Requires: /etc/init
Requires(post): /usr/bin/killall
Requires(preun): /sbin/initctl
@@ -304,18 +283,32 @@ Provides: clamav-scanner-upstart = %version-%release
%endif
Obsoletes: clamav-scanner-upstart < %version-%release
%if %{with systemd}
-Provides: init(clamav-scanner) = systemd
%endif
-%{?noarch}
-%description scanner
+### Fedora Extras introduced them differently :(
+Provides: clamav-server = %{version}-%{release}
+Obsoletes: clamav-server < %{version}-%{release}
+Provides: clamav-server-sysv = %{version}-%{release}
+Obsoletes: clamav-server-sysv < %{version}-%{release}
+Provides: clamav-scanner = %{version}-%{release}
+Obsoletes: clamav-scanner < %{version}-%{release}
+Provides: clamav-scanner-upstart = %{version}-%{release}
+Obsoletes: clamav-scanner-upstart < %{version}-%{release}
+Provides: clamav-server-sysvinit = %{version}-%{release}
+Obsoletes: clamav-server-sysvinit < %{version}-%{release}
+
+
+%description -n clamd
+The Clam AntiVirus Daemon
+See the README file how this can be done with a minimum of effort.
This package contains a generic system wide clamd service which is
e.g. used by the clamav-milter package.
%package milter
Summary: Milter module for the Clam Antivirus scanner
Group: System Environment/Daemons
-Requires: init(clamav-milter)
+Requires: clamd = %{version}-%{release}
+Requires: /usr/sbin/sendmail
Provides: user(%milteruser) = 5
Provides: group(%milteruser) = 5
Requires(post): coreutils
@@ -327,7 +320,6 @@ Provides: milter(clamav) = postfix
%if %{with sysv}
# Remove me after EOL of RHEL5
-Provides: init(clamav-milter) = sysvinit
Requires(post): user(%milteruser) clamav-milter
Requires(preun): user(%milteruser) clamav-milter
Requires: %_initrddir
@@ -339,16 +331,12 @@ Provides: clamav-milter-sysvinit = %version-%release
Obsoletes: clamav-milter-sysvinit < %version-%release
%if %{with upstart}
# Remove me after EOL of RHEL6
-Provides: init(clamav-milter) = upstart
Requires: /etc/init
Requires(post): /usr/bin/killall
Requires(preun): /sbin/initctl
Provides: clamav-milter-upstart = %version-%release
%endif
Obsoletes: clamav-milter-upstart < %version-%release
-%if %{with systemd}
-Provides: init(clamav-milter) = systemd
-%endif
%description milter
This package contains files which are needed to run the clamav-milter.
@@ -398,19 +386,21 @@ export have_cv_ipv6=yes
rm -rf libltdl autom4te.cache Makefile.in
autoreconf -i
%configure \
- --disable-static \
- --disable-rpath \
- --disable-silent-rules \
+ --enable-milter \
--disable-clamav \
- --with-user=%updateuser \
+ --disable-static \
+ --disable-zlib-vcheck \
+ %{!?with_unrar:--disable-unrar} \
+ --enable-id-check \
+ --enable-dns \
+ --with-dbdir=%homedir \
--with-group=%updateuser \
--with-libcurl=%{_prefix} \
- --with-dbdir=%homedir \
- --enable-milter \
+ --with-user=%updateuser \
+ --disable-rpath \
+ --disable-silent-rules \
--enable-clamdtop \
- --disable-zlib-vcheck \
- %{!?with_bytecode:--disable-llvm} \
- %{!?with_unrar:--disable-unrar}
+ %{!?with_bytecode:--disable-llvm}
# TODO: check periodically that CLAMAVUSER is used for freshclam only
@@ -581,7 +571,7 @@ usermod %{updateuser} -a -G virusgroup
exit 0
-%pre scanner
+%pre -n clamd
getent group %{scanuser} >/dev/null || groupadd -r %{scanuser}
getent passwd %{scanuser} >/dev/null || \
useradd -r -g %{scanuser} -d / -s /sbin/nologin \
@@ -589,7 +579,7 @@ getent passwd %{scanuser} >/dev/null || \
usermod %{scanuser} -a -G virusgroup
exit 0
-%post scanner
+%post -n clamd
%if %{with sysv}
/sbin/chkconfig --add clamd.scan
%endif
@@ -597,11 +587,12 @@ exit 0
/usr/bin/killall -u %scanuser clamd 2>/dev/null || :
%endif
%if %{with systemd}
+%systemd_post clamd@.service
%systemd_post clamd(a)scan.service
%{?with_tmpfiles:/bin/systemd-tmpfiles --create %_tmpfilesdir/clamd.scan.conf || :}
%endif
-%preun scanner
+%preun -n clamd
%if %{with sysv}
test "$1" != 0 || %_initrddir/clamd.scan stop &>/dev/null || :
test "$1" != 0 || /sbin/chkconfig --del clamd.scan
@@ -610,14 +601,16 @@ test "$1" != 0 || /sbin/chkconfig --del clamd.scan
test "$1" != "0" || /sbin/initctl -q stop clamd.scan || :
%endif
%if %{with systemd}
+%systemd_preun clamd@.service
%systemd_preun clamd(a)scan.service
%endif
-%postun scanner
+%postun -n clamd
%if %{with sysv}
test "$1" = 0 || %_initrddir/clamd.scan condrestart >/dev/null || :
%endif
%if %{with systemd}
+%systemd_postun_with_restart clamd@.service
%systemd_postun_with_restart clamd(a)scan.service
%endif
@@ -630,16 +623,6 @@ test -e %freshclamlog || {
! test -x /sbin/restorecon || /sbin/restorecon %freshclamlog
}
-%if %{with systemd}
-%post server
-%systemd_post clamd@.service
-
-%preun server
-%systemd_preun clamd@.service
-
-%postun server
-%systemd_postun_with_restart clamd@.service
-%endif
%triggerin milter -- clamav-scanner
# Add the milteruser to the scanuser group; this is required when
@@ -761,7 +744,7 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
## -----------------------
-%files server
+%files -n clamd
%doc _doc_server/*
%_mandir/man5/clamd.conf.5*
%_mandir/man8/clamd.8*
@@ -774,12 +757,8 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
%_unitdir/clamd@.service
%endif
-## -----------------------
-
-%files scanner
%config(noreplace) %_sysconfdir/clamd.d/scan.conf
%ghost %scanstatedir/clamd.sock
-
%if %{with tmpfiles}
%_tmpfilesdir/clamd.scan.conf
%ghost %dir %attr(0710,%scanuser,%scanuser) %scanstatedir
@@ -832,6 +811,9 @@ test "$1" = 0 || %_initrddir/clamav-milter condrestart
>/dev/null || :
el6 .
- Remove provides/obsoletes for very old sub-packges clamav-milter-core,
clamav-milter-sendmail and clamav-milter-core
+- Call server and scanner sub-packages as clamd (el6 compatible and as uppstream
+ call it)
+- clamav-data provides clamav-db (el6 compatible)
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain(a)fedoraproject.org> - 0.99.3-6
- Escape macros in %%changelog
commit 5491d97aceda628aa23cca34147c3e6d9db8571d
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Tue Feb 13 04:24:05 2018 +0000
remove sub-packages , sysvinit , upstart, systemd to be more compatible with
el6 .
Adjust requires, provides and obsoletes.
- Remove provides/obsoletes for very old sub-packges clamav-milter-core,
clamav-milter-sendmail and clamav-milter-core
diff --git a/clamav.spec b/clamav.spec
index 402bf3c..242c52b 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -57,7 +57,7 @@
Summary: End-user tools for the Clam Antivirus scanner
Name: clamav
Version: 0.99.3
-Release: 6%{?dist}
+Release: 7%{?dist}
License: %{?with_unrar:proprietary}%{!?with_unrar:GPLv2}
Group: Applications/File
URL:
http://www.clamav.net
@@ -252,8 +252,14 @@ Requires: data(clamav)
Requires: clamav-filesystem = %version-%release
Requires: clamav-lib = %version-%release
Requires: coreutils
-%if ! %{with sysv}
+%if %{with sysv}
+Requires: %_initrddir
+Provides: init(clamav-server) = sysv
+Provides: clamav-server-sysvinit = %version-%release
+%endif
Obsoletes: clamav-server-sysvinit < %version-%release
+%if %{with systemd}
+Provides: init(clamav-server) = systemd
%endif
%description server
@@ -268,31 +274,6 @@ of this daemon should be started for each service requiring it.
See the README file how this can be done with a minimum of effort.
-%package server-sysvinit
-Summary: SysV initscripts for clamav server
-Group: System Environment/Daemons
-Provides: init(clamav-server) = sysv
-Requires: clamav-server = %version-%release
-Requires: %_initrddir
-Provides: clamav-server-sysv = %version-%release
-Obsoletes: clamav-server-sysv < %version-%release
-%{?noarch}
-
-%description server-sysvinit
-SysV initscripts template for the clamav server
-
-
-%package server-systemd
-Summary: Systemd initscripts for clamav server
-Group: System Environment/Daemons
-Provides: init(clamav-server) = systemd
-Requires: clamav-server = %version-%release
-%{?noarch}
-
-%description server-systemd
-Systemd template for the clamav server
-
-
%package scanner
Summary: Clamav scanner daemon
Group: System Environment/Daemons
@@ -302,62 +283,34 @@ Provides: group(%scanuser) = 49
Requires: clamav-server = %version-%release
Requires(pre): shadow-utils
Requires(pre): group(virusgroup)
-%if ! %{with sysv}
-Obsoletes: clamav-scanner-sysvinit < %version-%release
-%endif
-%if ! %{with upstart}
-Obsoletes: clamav-scanner-upstart < %version-%release
-%endif
-%{?noarch}
-
-%description scanner
-This package contains a generic system wide clamd service which is
-e.g. used by the clamav-milter package.
-
-
+%if %{with sysv}
# Remove me after EOL of RHEL5
-%package scanner-sysvinit
-Summary: SysV initscripts for clamav scanner daemon
-Group: System Environment/Daemons
Provides: init(clamav-scanner) = sysv
Requires: clamav-server-sysvinit = %version-%release
-Requires: clamav-scanner = %version-%release
Requires: %_initrddir
Requires(postun): initscripts
Requires(post): chkconfig
Requires(preun): chkconfig initscripts
-%{?noarch}
-
-%description scanner-sysvinit
-The SysV initscripts for clamav-scanner.
-
-
+%else
+Obsoletes: clamav-scanner-sysvinit < %version-%release
+%endif
+%if %{with upstart}
# Remove me after EOL of RHEL6
-%package scanner-upstart
-Summary: Upstart initscripts for clamav scanner daemon
-Group: System Environment/Daemons
Provides: init(clamav-scanner) = upstart
-Requires: clamav-scanner = %version-%release
Requires: /etc/init
Requires(post): /usr/bin/killall
Requires(preun): /sbin/initctl
-%{?noarch}
-
-%description scanner-upstart
-The Upstart initscripts for clamav-scanner.
-
-
-%package scanner-systemd
-Summary: Systemd initscripts for clamav scanner daemon
-Group: System Environment/Daemons
+Provides: clamav-scanner-upstart = %version-%release
+%endif
+Obsoletes: clamav-scanner-upstart < %version-%release
+%if %{with systemd}
Provides: init(clamav-scanner) = systemd
-Requires: clamav-scanner = %version-%release
-Requires: clamav-server-systemd = %version-%release
+%endif
%{?noarch}
-%description scanner-systemd
-The systemd initscripts for clamav-scanner.
-
+%description scanner
+This package contains a generic system wide clamd service which is
+e.g. used by the clamav-milter package.
%package milter
Summary: Milter module for the Clam Antivirus scanner
@@ -372,65 +325,34 @@ Requires(pre): group(virusgroup)
Provides: milter(clamav) = sendmail
Provides: milter(clamav) = postfix
-Provides: clamav-milter-core = %version-%release
-Obsoletes: clamav-milter-core < %version-%release
-Provides: clamav-milter-sendmail = %version-%release
-Obsoletes: clamav-milter-sendmail < %version-%release
-%if ! %{with sysv}
-Obsoletes: clamav-milter-sysvinit < %version-%release
-%endif
-%if ! %{with upstart}
-Obsoletes: clamav-milter-upstart < %version-%release
-%endif
-
-%description milter
-This package contains files which are needed to run the clamav-milter.
-
-
+%if %{with sysv}
# Remove me after EOL of RHEL5
-%package milter-sysvinit
-Summary: SysV initscripts for the clamav sendmail-milter
-Group: System Environment/Daemons
Provides: init(clamav-milter) = sysvinit
-Requires: clamav-milter = %version-%release
Requires(post): user(%milteruser) clamav-milter
Requires(preun): user(%milteruser) clamav-milter
Requires: %_initrddir
Requires(postun): initscripts
Requires(post): chkconfig
Requires(preun): chkconfig initscripts
-Provides: clamav-milter-sysv = %version-%release
-Obsoletes: clamav-milter-sysv < %version-%release
-%{?noarch}
-
-%description milter-sysvinit
-The SysV initscripts for clamav-milter.
-
-
+Provides: clamav-milter-sysvinit = %version-%release
+%endif
+Obsoletes: clamav-milter-sysvinit < %version-%release
+%if %{with upstart}
# Remove me after EOL of RHEL6
-%package milter-upstart
-Summary: Upstart initscripts for the clamav sendmail-milter
-Group: System Environment/Daemons
Provides: init(clamav-milter) = upstart
-Requires: clamav-milter = %version-%release
Requires: /etc/init
Requires(post): /usr/bin/killall
Requires(preun): /sbin/initctl
-%{?noarch}
-
-%description milter-upstart
-The Upstart initscripts for clamav-milter.
-
-
-%package milter-systemd
-Summary: Systemd initscripts for the clamav sendmail-milter
-Group: System Environment/Daemons
+Provides: clamav-milter-upstart = %version-%release
+%endif
+Obsoletes: clamav-milter-upstart < %version-%release
+%if %{with systemd}
Provides: init(clamav-milter) = systemd
-Requires: clamav-milter = %version-%release
-%{?noarch}
+%endif
+
+%description milter
+This package contains files which are needed to run the clamav-milter.
-%description milter-systemd
-The systemd initscripts for clamav-scanner.
## ------------------------------------------------------------
%prep
@@ -667,9 +589,37 @@ getent passwd %{scanuser} >/dev/null || \
usermod %{scanuser} -a -G virusgroup
exit 0
-%{?with_tmpfiles:
%post scanner
-%{?with_systemd:/bin/systemd-tmpfiles --create %_tmpfilesdir/clamd.scan.conf || :}}
+%if %{with sysv}
+/sbin/chkconfig --add clamd.scan
+%endif
+%if %{with upstart}
+/usr/bin/killall -u %scanuser clamd 2>/dev/null || :
+%endif
+%if %{with systemd}
+%systemd_post clamd(a)scan.service
+%{?with_tmpfiles:/bin/systemd-tmpfiles --create %_tmpfilesdir/clamd.scan.conf || :}
+%endif
+
+%preun scanner
+%if %{with sysv}
+test "$1" != 0 || %_initrddir/clamd.scan stop &>/dev/null || :
+test "$1" != 0 || /sbin/chkconfig --del clamd.scan
+%endif
+%if %{with upstart}
+test "$1" != "0" || /sbin/initctl -q stop clamd.scan || :
+%endif
+%if %{with systemd}
+%systemd_preun clamd(a)scan.service
+%endif
+
+%postun scanner
+%if %{with sysv}
+test "$1" = 0 || %_initrddir/clamd.scan condrestart >/dev/null || :
+%endif
+%if %{with systemd}
+%systemd_postun_with_restart clamd(a)scan.service
+%endif
%post update
@@ -680,6 +630,16 @@ test -e %freshclamlog || {
! test -x /sbin/restorecon || /sbin/restorecon %freshclamlog
}
+%if %{with systemd}
+%post server
+%systemd_post clamd@.service
+
+%preun server
+%systemd_preun clamd@.service
+
+%postun server
+%systemd_postun_with_restart clamd@.service
+%endif
%triggerin milter -- clamav-scanner
# Add the milteruser to the scanuser group; this is required when
@@ -701,9 +661,36 @@ test -e %milterlog || {
chown root:%milteruser %milterlog
! test -x /sbin/restorecon || /sbin/restorecon %milterlog
}
-%{?with_tmpfiles:
-%{?with_systemd:/bin/systemd-tmpfiles --create %_tmpfilesdir/clamav-milter.conf || :}}
+%if %{with sysv}
+/sbin/chkconfig --add clamav-milter
+%endif
+%if %{with upstart}
+/usr/bin/killall -u %milteruser clamav-milter 2>/dev/null || :
+%endif
+%if %{with systemd}
+%systemd_post clamav-milter.service
+%{?with_tmpfiles:/bin/systemd-tmpfiles --create %_tmpfilesdir/clamav-milter.conf || :}
+%endif
+
+%preun milter
+%if %{with sysv}
+test "$1" != 0 || %_initrddir/clamav-milter stop &>/dev/null || :
+test "$1" != 0 || /sbin/chkconfig --del clamav-milter
+%endif
+%if %{with upstart}
+test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
+%endif
+%if %{with systemd}
+%systemd_preun clamav-milter.service
+%endif
+%postun milter
+%if %{with sysv}
+test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
+%endif
+%if %{with systemd}
+%systemd_postun_with_restart clamav-milter.service
+%endif
%post lib -p /sbin/ldconfig
%postun lib -p /sbin/ldconfig
@@ -779,25 +766,12 @@ test -e %milterlog || {
%_mandir/man5/clamd.conf.5*
%_mandir/man8/clamd.8*
%_sbindir/clamd
-
%if %{with sysv}
-%files server-sysvinit
%_initrddir/clamd-wrapper
%pkgdatadir/clamd-wrapper
%endif
-
%if %{with systemd}
-%post server-systemd
-%systemd_post clamd@.service
-
-%preun server-systemd
-%systemd_preun clamd@.service
-
-%postun server-systemd
-%systemd_postun_with_restart clamd@.service
-
-%files server-systemd
- %_unitdir/clamd@.service
+%_unitdir/clamd@.service
%endif
## -----------------------
@@ -812,45 +786,14 @@ test -e %milterlog || {
%else
%dir %attr(0710,%scanuser,%scanuser) %scanstatedir
%endif
-
%if %{with sysv}
-%post scanner-sysvinit
-/sbin/chkconfig --add clamd.scan
-
-%preun scanner-sysvinit
-test "$1" != 0 || %_initrddir/clamd.scan stop &>/dev/null || :
-test "$1" != 0 || /sbin/chkconfig --del clamd.scan
-
-%postun scanner-sysvinit
-test "$1" = 0 || %_initrddir/clamd.scan condrestart >/dev/null || :
-
-%files scanner-sysvinit
%attr(0755,root,root) %config %_initrddir/clamd.scan
%ghost %scanstatedir/clamd.pid
%endif
-
%if %{with upstart}
-%post scanner-upstart
-/usr/bin/killall -u %scanuser clamd 2>/dev/null || :
-
-%preun scanner-upstart
-test "$1" != "0" || /sbin/initctl -q stop clamd.scan || :
-
-%files scanner-upstart
%config(noreplace) %_sysconfdir/init/clamd.scan*
%endif
-
%if %{with systemd}
-%post scanner-systemd
-%systemd_post clamd(a)scan.service
-
-%preun scanner-systemd
-%systemd_preun clamd(a)scan.service
-
-%postun scanner-systemd
-%systemd_postun_with_restart clamd(a)scan.service
-
-%files scanner-systemd
%_unitdir/clamd(a)scan.service
%endif
@@ -871,50 +814,25 @@ test "$1" != "0" || /sbin/initctl -q stop
clamd.scan || :
%else
%dir %attr(0710,%milteruser,%milteruser) %milterstatedir
%endif
-
%if %{with sysv}
-%post milter-sysvinit
-/sbin/chkconfig --add clamav-milter
-
-%preun milter-sysvinit
-test "$1" != 0 || %_initrddir/clamav-milter stop &>/dev/null || :
-test "$1" != 0 || /sbin/chkconfig --del clamav-milter
-
-%postun milter-sysvinit
-test "$1" = 0 || %_initrddir/clamav-milter condrestart >/dev/null || :
-
-%files milter-sysvinit
%config %_initrddir/clamav-milter
%ghost %milterstatedir/clamav-milter.pid
%endif
-
%if %{with upstart}
-%post milter-upstart
-/usr/bin/killall -u %milteruser clamav-milter 2>/dev/null || :
-
-%preun milter-upstart
-test "$1" != "0" || /sbin/initctl -q stop clamav-milter || :
-
-%files milter-upstart
%config(noreplace) %_sysconfdir/init/clamav-milter*
%endif
-
%if %{with systemd}
-%post milter-systemd
-%systemd_post clamav-milter.service
-
-%preun milter-systemd
-%systemd_preun clamav-milter.service
-
-%postun milter-systemd
-%systemd_postun_with_restart clamav-milter.service
-
-%files milter-systemd
%_unitdir/clamav-milter.service
%endif
%changelog
+* Tue Feb 13 2018 Sérgio Basto <sergio(a)serjux.com> - 0.99.3-7
+- Remove sub-packages , sysvinit , upstart, systemd to be more compatible with
+ el6 .
+- Remove provides/obsoletes for very old sub-packges clamav-milter-core,
+ clamav-milter-sendmail and clamav-milter-core
+
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain(a)fedoraproject.org> - 0.99.3-6
- Escape macros in %%changelog