1 |
commit: e33445233f097eadbbb1acf0861e9a41593bc593 |
2 |
Author: coyote <coyote <AT> bks <DOT> tv> |
3 |
AuthorDate: Thu Nov 23 01:52:52 2017 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 23 22:30:48 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3344523 |
7 |
|
8 |
app-antivirus/clamav: fix compatibility with >=zlib-1.2.9 |
9 |
|
10 |
Include patch from Marc Deslauriers <marc.deslauriers <AT> canonical.com> to |
11 |
fix compatibility with zlib newer 1.2.9 and enable test in ebuild (now |
12 |
it work correctly). |
13 |
|
14 |
(commit message cleaned up by Robin H. Johnson <robbat2 <AT> gentoo.org>) |
15 |
|
16 |
Bug: https://bugs.launchpad.net/ubuntu/+source/clamav/+bug/1692073 |
17 |
Closes: https://bugs.gentoo.org/638544 |
18 |
(cherry picked from commit 535d9b43c3472916bfb977921f0a10f2cc02dc4b) |
19 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
20 |
|
21 |
app-antivirus/clamav/Manifest | 2 +- |
22 |
app-antivirus/clamav/clamav-0.99.2-r1.ebuild | 6 ++- |
23 |
.../clamav/files/clamav-0.99.2-bytecode_api.patch | 50 ++++++++++++++++++++++ |
24 |
3 files changed, 56 insertions(+), 2 deletions(-) |
25 |
|
26 |
diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest |
27 |
index 18a55f717c3..7c1733ae48b 100644 |
28 |
--- a/app-antivirus/clamav/Manifest |
29 |
+++ b/app-antivirus/clamav/Manifest |
30 |
@@ -1,4 +1,4 @@ |
31 |
DIST clamav-0.98.7.tar.gz 15118851 SHA256 282417b707740de13cd8f18d4cbca9ddd181cf96b444db2cad98913a5153e272 SHA512 acf01961472c13ccb219420cc3fa3c3e6f8a733edef371dbc04ce5867900aa1535e956ec8ad50d31c8f872a0a1d79fcccac944cd86e29ecdfa4af18f7fd5afb9 WHIRLPOOL c9f2e6f52f07f68bdcccf55ca1aab0bf3deaa6963279459d64ecca076a9ed0ef53c25996b2b673e9746833822df24689a9fab0654064c5ee6ed372a86966fbb6 |
32 |
DIST clamav-0.99.1.tar.gz 15990867 SHA256 e144689122d3f91293808c82cbb06b7d3ac9eca7ae29564c5d148ffe7b25d58a SHA512 9beb5c0ebff2aef741bb27811c1f10a7cd5da354ff67272ee8994d87c95e272a5983105af0fe1a734e1fa99f112dc4dddd9d82074a0df6715814817f85a45f4f WHIRLPOOL e2afd7b7d377c1a1af802e780839bb21bcd318035ac858b6cb11545db3673d3f74ba3159b837238982248720379f98ab51e279a8636bbea89331136891e88e5d |
33 |
-DIST clamav-0.99.2.tar.gz 16067497 SHA256 167bd6a13e05ece326b968fdb539b05c2ffcfef6018a274a10aeda85c2c0027a SHA512 7744ba8a344b163cf98e9737cddfd25d2120b34ee9c4518380e028c9ec3cd50127b198b0dfa9fde30f5ce9aab0c0e6384712fbc11287e77d16ce052fd7b6ac44 WHIRLPOOL 371dc56c3ffa0ff40381d451687a9331a0587943a048604c6667e1018fbfe5559b023654d29f47505bd69a1a44f88adfb5b93b7c55c8cbc6f0bbfcbf836bf631 |
34 |
+DIST clamav-0.99.2.tar.gz 16067497 BLAKE2B 4155e3125ccc45cc6828033f207b6b8d3514253dfb8156428ad4096c0901d5a8500f9dd253b8f40afdc49a6039b647627868f75d51829ab7bd247ada5f3b8383 SHA512 7744ba8a344b163cf98e9737cddfd25d2120b34ee9c4518380e028c9ec3cd50127b198b0dfa9fde30f5ce9aab0c0e6384712fbc11287e77d16ce052fd7b6ac44 |
35 |
DIST clamav-0.99.tar.gz 15968038 SHA256 d2792c8cfadd685fffc40b2199679628815df031fd3149ccf961649fc8787ea9 SHA512 328e66fa412ba61f5e44c839b254c7a84d2ce7821fda6cf29e4ee9532c06e45bdec62f202ca561223e984fff170bfd8280e5cc8e306c09a3017b17e7db3bbf56 WHIRLPOOL 696b425c0d3a6639d627e6dba000a57c4e532232f9f42a564a992c0b459d8041a1947b09548d99b621a5685c78d91045adf4b61731242f55eda2b8d5150fc8b8 |
36 |
|
37 |
diff --git a/app-antivirus/clamav/clamav-0.99.2-r1.ebuild b/app-antivirus/clamav/clamav-0.99.2-r1.ebuild |
38 |
index 579249e1388..a44017407cf 100644 |
39 |
--- a/app-antivirus/clamav/clamav-0.99.2-r1.ebuild |
40 |
+++ b/app-antivirus/clamav/clamav-0.99.2-r1.ebuild |
41 |
@@ -7,7 +7,6 @@ inherit autotools eutils flag-o-matic user systemd |
42 |
|
43 |
DESCRIPTION="Clam Anti-Virus Scanner" |
44 |
HOMEPAGE="http://www.clamav.net/" |
45 |
-# no longer on sf.net from 0.99.2 onwards |
46 |
SRC_URI="https://www.clamav.net/downloads/production/${P}.tar.gz" |
47 |
|
48 |
LICENSE="GPL-2" |
49 |
@@ -40,6 +39,7 @@ PATCHES=( |
50 |
"${FILESDIR}"/${P}-gcc-6.patch |
51 |
"${FILESDIR}"/${P}-tinfo.patch |
52 |
"${FILESDIR}"/${PN}-0.99-zlib.patch |
53 |
+ "${FILESDIR}"/${P}-bytecode_api.patch |
54 |
) |
55 |
|
56 |
pkg_setup() { |
57 |
@@ -142,6 +142,10 @@ src_install() { |
58 |
prune_libtool_files --all |
59 |
} |
60 |
|
61 |
+src_test() { |
62 |
+ emake quick-check |
63 |
+} |
64 |
+ |
65 |
pkg_postinst() { |
66 |
if use milter ; then |
67 |
elog "For simple instructions how to setup the clamav-milter read the" |
68 |
|
69 |
diff --git a/app-antivirus/clamav/files/clamav-0.99.2-bytecode_api.patch b/app-antivirus/clamav/files/clamav-0.99.2-bytecode_api.patch |
70 |
new file mode 100644 |
71 |
index 00000000000..d6cd5264ed7 |
72 |
--- /dev/null |
73 |
+++ b/app-antivirus/clamav/files/clamav-0.99.2-bytecode_api.patch |
74 |
@@ -0,0 +1,50 @@ |
75 |
+Description: fix compatibility with zlib 1.2.9 and newer |
76 |
+Author: Marc Deslauriers <marc.deslauriers@×××××××××.com> |
77 |
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/clamav/+bug/1692073 |
78 |
+ |
79 |
+--- a/libclamav/bytecode_api.c 2017-08-08 15:20:06.651685637 -0400 |
80 |
++++ b/libclamav/bytecode_api.c 2017-08-15 15:45:14.645714766 -0400 |
81 |
+@@ -811,8 +811,20 @@ int32_t cli_bcapi_inflate_init(struct cl |
82 |
+ cli_dbgmsg("bytecode api: inflate_init: invalid buffers!\n"); |
83 |
+ return -1; |
84 |
+ } |
85 |
+- memset(&stream, 0, sizeof(stream)); |
86 |
+- ret = inflateInit2(&stream, windowBits); |
87 |
++ |
88 |
++ b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n); |
89 |
++ if (!b) { |
90 |
++ return -1; |
91 |
++ } |
92 |
++ ctx->inflates = b; |
93 |
++ ctx->ninflates = n; |
94 |
++ b = &b[n-1]; |
95 |
++ |
96 |
++ b->from = from; |
97 |
++ b->to = to; |
98 |
++ b->needSync = 0; |
99 |
++ memset(&b->stream, 0, sizeof(stream)); |
100 |
++ ret = inflateInit2(&b->stream, windowBits); |
101 |
+ switch (ret) { |
102 |
+ case Z_MEM_ERROR: |
103 |
+ cli_dbgmsg("bytecode api: inflateInit2: out of memory!\n"); |
104 |
+@@ -829,20 +841,6 @@ int32_t cli_bcapi_inflate_init(struct cl |
105 |
+ cli_dbgmsg("bytecode api: inflateInit2: unknown error %d\n", ret); |
106 |
+ return -1; |
107 |
+ } |
108 |
+- |
109 |
+- b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates)*n); |
110 |
+- if (!b) { |
111 |
+- inflateEnd(&stream); |
112 |
+- return -1; |
113 |
+- } |
114 |
+- ctx->inflates = b; |
115 |
+- ctx->ninflates = n; |
116 |
+- b = &b[n-1]; |
117 |
+- |
118 |
+- b->from = from; |
119 |
+- b->to = to; |
120 |
+- b->needSync = 0; |
121 |
+- memcpy(&b->stream, &stream, sizeof(stream)); |
122 |
+ return n-1; |
123 |
+ } |
124 |
+ |