diff options
Diffstat (limited to 'recipes-scanners/clamav/files')
-rw-r--r-- | recipes-scanners/clamav/files/fix_libcurl_check.patch | 231 | ||||
-rw-r--r-- | recipes-scanners/clamav/files/fix_pcre_check.patch | 443 | ||||
-rw-r--r-- | recipes-scanners/clamav/files/libcamav_fix.patch | 13 | ||||
-rw-r--r-- | recipes-scanners/clamav/files/libclamav_fix.patch | 41 |
4 files changed, 728 insertions, 0 deletions
diff --git a/recipes-scanners/clamav/files/fix_libcurl_check.patch b/recipes-scanners/clamav/files/fix_libcurl_check.patch new file mode 100644 index 0000000..163a32d --- /dev/null +++ b/recipes-scanners/clamav/files/fix_libcurl_check.patch | |||
@@ -0,0 +1,231 @@ | |||
1 | clamav .102.2 tries to find clamav using culf_config. Use EO pkg_config instead | ||
2 | |||
3 | Upstream-Status: OE specific | ||
4 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
5 | |||
6 | Index: git/configure | ||
7 | =================================================================== | ||
8 | --- git.orig/configure | ||
9 | +++ git/configure | ||
10 | @@ -29921,207 +29921,24 @@ $as_echo_n "checking for libcurl install | ||
11 | |||
12 | |||
13 | # Check whether --with-libcurl was given. | ||
14 | +have_curl="no" | ||
15 | if test "${with_libcurl+set}" = set; then : | ||
16 | withval=$with_libcurl; | ||
17 | -find_curl="no" | ||
18 | -if test "X$withval" = "Xyes"; then | ||
19 | - find_curl="yes" | ||
20 | -else | ||
21 | - if test "X$withval" != "Xno"; then | ||
22 | - if test -f "${withval}/bin/curl-config"; then | ||
23 | - LIBCURL_HOME="$withval" | ||
24 | - have_curl="yes" | ||
25 | - fi | ||
26 | + if test "X$withval" != "Xno"; then | ||
27 | + if test "${PKG_CONFIG} libcurl --exists"; then | ||
28 | + LIBCURL_HOME="$withval" | ||
29 | + CURL_LIBS=$($PKG_CONFIG libcurl --libs) | ||
30 | + #CURL_CPPFLAGS=$($PKG_CONFIG libcurl --cflags) | ||
31 | + | ||
32 | + CURL_LDFLAGS="-L$LIBCURL_HOME/lib" | ||
33 | + CURL_CPPFLAGS="-I$LIBCURL_HOME/include" | ||
34 | + | ||
35 | + have_curl="yes" | ||
36 | + save_LDFLAGS="$LDFLAGS" | ||
37 | + LDFLAGS="$CURL_LDFLAGS $CURL_LIBS $SSL_LDFLAGS $SSL_LIBS" | ||
38 | fi | ||
39 | -fi | ||
40 | - | ||
41 | -else | ||
42 | - find_curl="yes" | ||
43 | -fi | ||
44 | - | ||
45 | - | ||
46 | -if test "X$find_curl" = "Xyes"; then | ||
47 | - for p in /usr/local /usr ; do | ||
48 | - if test -f "${p}/bin/curl-config"; then | ||
49 | - LIBCURL_HOME=$p | ||
50 | - have_curl="yes" | ||
51 | - fi | ||
52 | - done | ||
53 | -fi | ||
54 | - | ||
55 | -if test "X$have_curl" = "Xyes"; then | ||
56 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBCURL_HOME" >&5 | ||
57 | -$as_echo "$LIBCURL_HOME" >&6; } | ||
58 | - if test -f "$LIBCURL_HOME/bin/curl-config"; then | ||
59 | - CURL_LDFLAGS="$LDFLAGS" | ||
60 | - CURL_LIBS=$($LIBCURL_HOME/bin/curl-config --libs) | ||
61 | - CURL_CPPFLAGS=$($LIBCURL_HOME/bin/curl-config --cflags) | ||
62 | - else | ||
63 | - if test "$LIBCURL_HOME" != "/usr"; then | ||
64 | - CURL_LDFLAGS="-L$LIBCURL_HOME/lib" | ||
65 | - CURL_CPPFLAGS="-I$LIBCURL_HOME/include" | ||
66 | - else | ||
67 | - CURL_LDFLAGS="$LDFLAGS" | ||
68 | - CURL_CPPFLAGS="" | ||
69 | - fi | ||
70 | - CURL_LIBS="-lcurl" | ||
71 | - fi | ||
72 | - save_LDFLAGS="$LDFLAGS" | ||
73 | - LDFLAGS="$CURL_LDFLAGS $CURL_LIBS $SSL_LDFLAGS $SSL_LIBS" | ||
74 | - | ||
75 | - for ac_prog in gawk mawk nawk awk | ||
76 | -do | ||
77 | - # Extract the first word of "$ac_prog", so it can be a program name with args. | ||
78 | -set dummy $ac_prog; ac_word=$2 | ||
79 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
80 | -$as_echo_n "checking for $ac_word... " >&6; } | ||
81 | -if ${ac_cv_prog_AWK+:} false; then : | ||
82 | - $as_echo_n "(cached) " >&6 | ||
83 | -else | ||
84 | - if test -n "$AWK"; then | ||
85 | - ac_cv_prog_AWK="$AWK" # Let the user override the test. | ||
86 | -else | ||
87 | -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
88 | -for as_dir in $PATH | ||
89 | -do | ||
90 | - IFS=$as_save_IFS | ||
91 | - test -z "$as_dir" && as_dir=. | ||
92 | - for ac_exec_ext in '' $ac_executable_extensions; do | ||
93 | - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
94 | - ac_cv_prog_AWK="$ac_prog" | ||
95 | - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
96 | - break 2 | ||
97 | fi | ||
98 | -done | ||
99 | - done | ||
100 | -IFS=$as_save_IFS | ||
101 | - | ||
102 | -fi | ||
103 | -fi | ||
104 | -AWK=$ac_cv_prog_AWK | ||
105 | -if test -n "$AWK"; then | ||
106 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 | ||
107 | -$as_echo "$AWK" >&6; } | ||
108 | -else | ||
109 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
110 | -$as_echo "no" >&6; } | ||
111 | -fi | ||
112 | - | ||
113 | - | ||
114 | - test -n "$AWK" && break | ||
115 | -done | ||
116 | - | ||
117 | - | ||
118 | - curl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[1]+256*A[2]+A[3]; print X;}'" | ||
119 | - # Extract the first word of "curl-config", so it can be a program name with args. | ||
120 | -set dummy curl-config; ac_word=$2 | ||
121 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
122 | -$as_echo_n "checking for $ac_word... " >&6; } | ||
123 | -if ${ac_cv_path_curl_config+:} false; then : | ||
124 | - $as_echo_n "(cached) " >&6 | ||
125 | -else | ||
126 | - case $curl_config in | ||
127 | - [\\/]* | ?:[\\/]*) | ||
128 | - ac_cv_path_curl_config="$curl_config" # Let the user override the test with a path. | ||
129 | - ;; | ||
130 | - *) | ||
131 | - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
132 | -for as_dir in "$LIBCURL_HOME/bin" | ||
133 | -do | ||
134 | - IFS=$as_save_IFS | ||
135 | - test -z "$as_dir" && as_dir=. | ||
136 | - for ac_exec_ext in '' $ac_executable_extensions; do | ||
137 | - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
138 | - ac_cv_path_curl_config="$as_dir/$ac_word$ac_exec_ext" | ||
139 | - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
140 | - break 2 | ||
141 | - fi | ||
142 | -done | ||
143 | - done | ||
144 | -IFS=$as_save_IFS | ||
145 | - | ||
146 | - test -z "$ac_cv_path_curl_config" && ac_cv_path_curl_config=""notfound"" | ||
147 | - ;; | ||
148 | -esac | ||
149 | -fi | ||
150 | -curl_config=$ac_cv_path_curl_config | ||
151 | -if test -n "$curl_config"; then | ||
152 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_config" >&5 | ||
153 | -$as_echo "$curl_config" >&6; } | ||
154 | -else | ||
155 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
156 | -$as_echo "no" >&6; } | ||
157 | -fi | ||
158 | - | ||
159 | - | ||
160 | - | ||
161 | - | ||
162 | - awk_curl_version=`$curl_config --version | $AWK '{print $2}'` | ||
163 | - curl_version=`echo $awk_curl_version | $curl_version_parse` | ||
164 | - | ||
165 | - if test -z "$BUILD_CLAMONACC_TRUE"; then : | ||
166 | - if test $curl_version -ge 470272 ; then | ||
167 | - $enable_clamonacc="yes" | ||
168 | - else | ||
169 | - as_fn_error $? "Your libcurl (e.g. libcurl-devel) is too old. Installing ClamAV with clamonacc requires libcurl 7.45 or higher. For a quick fix, run ./configure again with --disable-clamonacc if you do not wish to use on-access scanning features. For more information on ClamAV's on-access scanner, please read our documentation: https://www.clamav.net/documents/on-access-scanning#on-access-scanning" "$LINENO" 5 | ||
170 | - fi | ||
171 | - | ||
172 | -fi | ||
173 | - | ||
174 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_easy_init in -lcurl" >&5 | ||
175 | -$as_echo_n "checking for curl_easy_init in -lcurl... " >&6; } | ||
176 | -if ${ac_cv_lib_curl_curl_easy_init+:} false; then : | ||
177 | - $as_echo_n "(cached) " >&6 | ||
178 | -else | ||
179 | - ac_check_lib_save_LIBS=$LIBS | ||
180 | -LIBS="-lcurl $CURL_LIBS | ||
181 | - $LIBS" | ||
182 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
183 | -/* end confdefs.h. */ | ||
184 | - | ||
185 | -/* Override any GCC internal prototype to avoid an error. | ||
186 | - Use char because int might match the return type of a GCC | ||
187 | - builtin and then its argument prototype would still apply. */ | ||
188 | -#ifdef __cplusplus | ||
189 | -extern "C" | ||
190 | -#endif | ||
191 | -char curl_easy_init (); | ||
192 | -int | ||
193 | -main () | ||
194 | -{ | ||
195 | -return curl_easy_init (); | ||
196 | - ; | ||
197 | - return 0; | ||
198 | -} | ||
199 | -_ACEOF | ||
200 | -if ac_fn_c_try_link "$LINENO"; then : | ||
201 | - ac_cv_lib_curl_curl_easy_init=yes | ||
202 | -else | ||
203 | - ac_cv_lib_curl_curl_easy_init=no | ||
204 | -fi | ||
205 | -rm -f core conftest.err conftest.$ac_objext \ | ||
206 | - conftest$ac_exeext conftest.$ac_ext | ||
207 | -LIBS=$ac_check_lib_save_LIBS | ||
208 | -fi | ||
209 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_easy_init" >&5 | ||
210 | -$as_echo "$ac_cv_lib_curl_curl_easy_init" >&6; } | ||
211 | -if test "x$ac_cv_lib_curl_curl_easy_init" = xyes; then : | ||
212 | - | ||
213 | - curl_msg=""; | ||
214 | - have_curl="yes"; | ||
215 | - CLAMSUBMIT_LIBS="$CLAMSUBMIT_LIBS $CURL_LDFLAGS $CURL_LIBS"; | ||
216 | - CLAMSUBMIT_CFLAGS="$CLAMSUBMIT_CFLAGS $CURL_CPPFLAGS"; | ||
217 | - FRESHCLAM_LIBS="$FRESHCLAM_LIBS $CURL_LDFLAGS $CURL_LIBS"; | ||
218 | - FRESHCLAM_CPPFLAGS="$FRESHCLAM_CPPFLAGS $CURL_CPPFLAGS" | ||
219 | - | ||
220 | -else | ||
221 | - | ||
222 | - as_fn_error $? "Your libcurl is misconfigured. libcurl (e.g. libcurl-devel) is required in order to build freshclam and clamsubmit." "$LINENO" 5 | ||
223 | - | ||
224 | -fi | ||
225 | - | ||
226 | - | ||
227 | - LDFLAGS="$save_LDFLAGS" | ||
228 | + LDFLAGS="$save_LDFLAGS" | ||
229 | else | ||
230 | as_fn_error $? "libcurl not found. libcurl (e.g. libcurl-devel) is required in order to build freshclam and clamsubmit." "$LINENO" 5 | ||
231 | fi | ||
diff --git a/recipes-scanners/clamav/files/fix_pcre_check.patch b/recipes-scanners/clamav/files/fix_pcre_check.patch new file mode 100644 index 0000000..81500c5 --- /dev/null +++ b/recipes-scanners/clamav/files/fix_pcre_check.patch | |||
@@ -0,0 +1,443 @@ | |||
1 | Index: git/configure | ||
2 | =================================================================== | ||
3 | --- git.orig/configure | ||
4 | +++ git/configure | ||
5 | @@ -22779,369 +22779,35 @@ fi | ||
6 | LIBS="$save_LIBS" | ||
7 | |||
8 | |||
9 | - | ||
10 | -# Check whether --with-pcre was given. | ||
11 | -if test "${with_pcre+set}" = set; then : | ||
12 | - withval=$with_pcre; pcreser=$withval | ||
13 | -else | ||
14 | - pcreser="yes" | ||
15 | -fi | ||
16 | - | ||
17 | - | ||
18 | -case "$pcreser" in | ||
19 | -no) | ||
20 | - pcreconfig="" | ||
21 | - ;; | ||
22 | -yes) | ||
23 | - # Extract the first word of "pcre2-config", so it can be a program name with args. | ||
24 | -set dummy pcre2-config; ac_word=$2 | ||
25 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
26 | -$as_echo_n "checking for $ac_word... " >&6; } | ||
27 | -if ${ac_cv_path_pcreconfig+:} false; then : | ||
28 | - $as_echo_n "(cached) " >&6 | ||
29 | -else | ||
30 | - case $pcreconfig in | ||
31 | - [\\/]* | ?:[\\/]*) | ||
32 | - ac_cv_path_pcreconfig="$pcreconfig" # Let the user override the test with a path. | ||
33 | - ;; | ||
34 | - *) | ||
35 | - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
36 | -for as_dir in $PATH | ||
37 | -do | ||
38 | - IFS=$as_save_IFS | ||
39 | - test -z "$as_dir" && as_dir=. | ||
40 | - for ac_exec_ext in '' $ac_executable_extensions; do | ||
41 | - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
42 | - ac_cv_path_pcreconfig="$as_dir/$ac_word$ac_exec_ext" | ||
43 | - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
44 | - break 2 | ||
45 | - fi | ||
46 | -done | ||
47 | - done | ||
48 | -IFS=$as_save_IFS | ||
49 | - | ||
50 | - ;; | ||
51 | -esac | ||
52 | -fi | ||
53 | -pcreconfig=$ac_cv_path_pcreconfig | ||
54 | -if test -n "$pcreconfig"; then | ||
55 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pcreconfig" >&5 | ||
56 | -$as_echo "$pcreconfig" >&6; } | ||
57 | -else | ||
58 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
59 | -$as_echo "no" >&6; } | ||
60 | -fi | ||
61 | - | ||
62 | - | ||
63 | - if test "x$pcreconfig" = "x"; then | ||
64 | - # Extract the first word of "pcre-config", so it can be a program name with args. | ||
65 | -set dummy pcre-config; ac_word=$2 | ||
66 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
67 | -$as_echo_n "checking for $ac_word... " >&6; } | ||
68 | -if ${ac_cv_path_pcreconfig+:} false; then : | ||
69 | - $as_echo_n "(cached) " >&6 | ||
70 | -else | ||
71 | - case $pcreconfig in | ||
72 | - [\\/]* | ?:[\\/]*) | ||
73 | - ac_cv_path_pcreconfig="$pcreconfig" # Let the user override the test with a path. | ||
74 | - ;; | ||
75 | - *) | ||
76 | - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
77 | -for as_dir in $PATH | ||
78 | -do | ||
79 | - IFS=$as_save_IFS | ||
80 | - test -z "$as_dir" && as_dir=. | ||
81 | - for ac_exec_ext in '' $ac_executable_extensions; do | ||
82 | - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
83 | - ac_cv_path_pcreconfig="$as_dir/$ac_word$ac_exec_ext" | ||
84 | - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
85 | - break 2 | ||
86 | - fi | ||
87 | -done | ||
88 | - done | ||
89 | -IFS=$as_save_IFS | ||
90 | - | ||
91 | - ;; | ||
92 | -esac | ||
93 | -fi | ||
94 | -pcreconfig=$ac_cv_path_pcreconfig | ||
95 | -if test -n "$pcreconfig"; then | ||
96 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pcreconfig" >&5 | ||
97 | -$as_echo "$pcreconfig" >&6; } | ||
98 | -else | ||
99 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
100 | -$as_echo "no" >&6; } | ||
101 | -fi | ||
102 | - | ||
103 | - | ||
104 | - if test "x$pcreconfig" = "x"; then | ||
105 | - { $as_echo "$as_me:${as_lineno-$LINENO}: cannot locate libpcre2 or libpcre within PATH" >&5 | ||
106 | -$as_echo "$as_me: cannot locate libpcre2 or libpcre within PATH" >&6;} | ||
107 | - else | ||
108 | - pcrelib="pcre" | ||
109 | - fi | ||
110 | - else | ||
111 | - pcrelib="pcre2" | ||
112 | - fi | ||
113 | - ;; | ||
114 | -"") | ||
115 | - as_fn_error $? "cannot assign blank value to --with-pcre" "$LINENO" 5 | ||
116 | - ;; | ||
117 | -*) | ||
118 | - # Extract the first word of "pcre2-config", so it can be a program name with args. | ||
119 | -set dummy pcre2-config; ac_word=$2 | ||
120 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
121 | -$as_echo_n "checking for $ac_word... " >&6; } | ||
122 | -if ${ac_cv_path_pcreconfig+:} false; then : | ||
123 | - $as_echo_n "(cached) " >&6 | ||
124 | -else | ||
125 | - case $pcreconfig in | ||
126 | - [\\/]* | ?:[\\/]*) | ||
127 | - ac_cv_path_pcreconfig="$pcreconfig" # Let the user override the test with a path. | ||
128 | - ;; | ||
129 | - *) | ||
130 | - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
131 | -for as_dir in $pcreser/bin | ||
132 | -do | ||
133 | - IFS=$as_save_IFS | ||
134 | - test -z "$as_dir" && as_dir=. | ||
135 | - for ac_exec_ext in '' $ac_executable_extensions; do | ||
136 | - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
137 | - ac_cv_path_pcreconfig="$as_dir/$ac_word$ac_exec_ext" | ||
138 | - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
139 | - break 2 | ||
140 | - fi | ||
141 | -done | ||
142 | - done | ||
143 | -IFS=$as_save_IFS | ||
144 | - | ||
145 | - ;; | ||
146 | -esac | ||
147 | -fi | ||
148 | -pcreconfig=$ac_cv_path_pcreconfig | ||
149 | -if test -n "$pcreconfig"; then | ||
150 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pcreconfig" >&5 | ||
151 | -$as_echo "$pcreconfig" >&6; } | ||
152 | -else | ||
153 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
154 | -$as_echo "no" >&6; } | ||
155 | -fi | ||
156 | - | ||
157 | - | ||
158 | - if test "x$pcreconfig" = "x"; then | ||
159 | - # Extract the first word of "pcre-config", so it can be a program name with args. | ||
160 | -set dummy pcre-config; ac_word=$2 | ||
161 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | ||
162 | -$as_echo_n "checking for $ac_word... " >&6; } | ||
163 | -if ${ac_cv_path_pcreconfig+:} false; then : | ||
164 | - $as_echo_n "(cached) " >&6 | ||
165 | -else | ||
166 | - case $pcreconfig in | ||
167 | - [\\/]* | ?:[\\/]*) | ||
168 | - ac_cv_path_pcreconfig="$pcreconfig" # Let the user override the test with a path. | ||
169 | - ;; | ||
170 | - *) | ||
171 | - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | ||
172 | -for as_dir in $pcreser/bin | ||
173 | -do | ||
174 | - IFS=$as_save_IFS | ||
175 | - test -z "$as_dir" && as_dir=. | ||
176 | - for ac_exec_ext in '' $ac_executable_extensions; do | ||
177 | - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | ||
178 | - ac_cv_path_pcreconfig="$as_dir/$ac_word$ac_exec_ext" | ||
179 | - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | ||
180 | - break 2 | ||
181 | - fi | ||
182 | -done | ||
183 | - done | ||
184 | -IFS=$as_save_IFS | ||
185 | - | ||
186 | - ;; | ||
187 | -esac | ||
188 | -fi | ||
189 | -pcreconfig=$ac_cv_path_pcreconfig | ||
190 | -if test -n "$pcreconfig"; then | ||
191 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pcreconfig" >&5 | ||
192 | -$as_echo "$pcreconfig" >&6; } | ||
193 | -else | ||
194 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
195 | -$as_echo "no" >&6; } | ||
196 | -fi | ||
197 | - | ||
198 | - | ||
199 | - if test "x$pcreconfig" = "x"; then | ||
200 | - as_fn_error $? "cannot locate libpcre2 or libpcre at $pcreser" "$LINENO" 5 | ||
201 | - else | ||
202 | - pcrelib="pcre" | ||
203 | - fi | ||
204 | - else | ||
205 | - pcrelib="pcre2" | ||
206 | - fi | ||
207 | - ;; | ||
208 | -esac | ||
209 | - | ||
210 | found_pcre="no" | ||
211 | -if test "x$pcreconfig" != "x"; then | ||
212 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pcre-config version" >&5 | ||
213 | -$as_echo_n "checking pcre-config version... " >&6; } | ||
214 | - pcre_version="`$pcreconfig --version`" | ||
215 | - | ||
216 | - if test "x$pcre_version" = "x"; then | ||
217 | - as_fn_error $? "$pcreconfig failed" "$LINENO" 5 | ||
218 | - fi | ||
219 | - | ||
220 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pcre_version" >&5 | ||
221 | -$as_echo "$pcre_version" >&6; } | ||
222 | - | ||
223 | - pcrever_prefix=`expr "$pcre_version" : '\([^0-9]*\)'` | ||
224 | - pcrever_frag=${pcre_version#$pcrever_prefix} | ||
225 | - | ||
226 | - pcrever_major=`expr "$pcrever_frag" : '\([0-9]*\)'` | ||
227 | - pcrever_frag=${pcrever_frag#*\.} | ||
228 | - pcrever_minor=`expr "$pcrever_frag" : '\([0-9]*\)'` | ||
229 | - | ||
230 | - if test "$pcrelib" = "pcre"; then | ||
231 | - if test $pcrever_major -lt 6; then | ||
232 | - as_fn_error $? "This pcre version is missing features used by ClamAV. Please upgrade to a newer version: http://www.pcre.org." "$LINENO" 5 | ||
233 | - fi | ||
234 | - if test $pcrever_major -eq 6 && test $pcrever_minor -lt 5; then | ||
235 | - as_fn_error $? "This pcre version is missing features used by ClamAV. Please upgrade to a newer version: http://www.pcre.org." "$LINENO" 5 | ||
236 | - fi | ||
237 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pcre (original) detected. We recommend upgrading from pcre to pcre2 10.30 or later: http://www.pcre.org." >&5 | ||
238 | -$as_echo "$as_me: WARNING: pcre (original) detected. We recommend upgrading from pcre to pcre2 10.30 or later: http://www.pcre.org." >&2;} | ||
239 | - fi | ||
240 | - | ||
241 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CVE-2017-7186" >&5 | ||
242 | -$as_echo_n "checking for CVE-2017-7186... " >&6; } | ||
243 | - if test "$pcrelib" = "pcre2"; then | ||
244 | - if test $pcrever_major -eq 10 && test $pcrever_minor -lt 24; then | ||
245 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The installed pcre2 version may contain security bugs. Please upgrade to 10.30 or later: http://www.pcre.org." >&5 | ||
246 | -$as_echo "$as_me: WARNING: The installed pcre2 version may contain security bugs. Please upgrade to 10.30 or later: http://www.pcre.org." >&2;} | ||
247 | - else | ||
248 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 | ||
249 | -$as_echo "ok" >&6; } | ||
250 | - fi | ||
251 | - else | ||
252 | - if test $pcrever_major -eq 8 && test $pcrever_minor -lt 41; then | ||
253 | - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The installed pcre version may contain security bugs. Please upgrade to 8.41+ or _preferably_ install pcre2 10.30+: http://www.pcre.org." >&5 | ||
254 | -$as_echo "$as_me: WARNING: The installed pcre version may contain security bugs. Please upgrade to 8.41+ or _preferably_ install pcre2 10.30+: http://www.pcre.org." >&2;} | ||
255 | - else | ||
256 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 | ||
257 | -$as_echo "ok" >&6; } | ||
258 | - fi | ||
259 | - fi | ||
260 | - | ||
261 | - found_pcre="yes" | ||
262 | - PCRE_HOME="`$pcreconfig --prefix`" | ||
263 | - PCRE_CPPFLAGS="`$pcreconfig --cflags`" | ||
264 | - if test "$pcrelib" = "pcre2"; then | ||
265 | - PCRE_LIBS="`$pcreconfig --libs8`" | ||
266 | - else | ||
267 | - PCRE_LIBS="`$pcreconfig --libs`" | ||
268 | - fi | ||
269 | - | ||
270 | - { $as_echo "$as_me:${as_lineno-$LINENO}: CFLAGS from pcre-config: $PCRE_CPPFLAGS" >&5 | ||
271 | -$as_echo "$as_me: CFLAGS from pcre-config: $PCRE_CPPFLAGS" >&6;} | ||
272 | - { $as_echo "$as_me:${as_lineno-$LINENO}: LIBS from pcre-config: $PCRE_LIBS" >&5 | ||
273 | -$as_echo "$as_me: LIBS from pcre-config: $PCRE_LIBS" >&6;} | ||
274 | -fi | ||
275 | - | ||
276 | have_pcre="no" | ||
277 | -if test "x$found_pcre" != "xno"; then | ||
278 | - save_CPPFLAGS="$CPPFLAGS" | ||
279 | - CPPFLAGS=$PCRE_CPPFLAGS | ||
280 | +# Check whether --with-pcre was given. | ||
281 | +if test "${with_pcre+set}" = set; then : | ||
282 | + withval=$with_pcre; | ||
283 | save_LDFLAGS="$LDFLAGS" | ||
284 | - LDFLAGS=$PCRE_LIBS | ||
285 | - | ||
286 | - if test "$pcrelib" = "pcre2"; then | ||
287 | - | ||
288 | - have_pcre="yes" | ||
289 | - else | ||
290 | - ac_fn_c_check_header_mongrel "$LINENO" "pcre.h" "ac_cv_header_pcre_h" "$ac_includes_default" | ||
291 | -if test "x$ac_cv_header_pcre_h" = xyes; then : | ||
292 | - have_pcre="yes" | ||
293 | -else | ||
294 | - have_pcre="no" | ||
295 | -fi | ||
296 | - | ||
297 | - | ||
298 | - if test "x$have_pcre" = "xno"; then | ||
299 | - ac_fn_c_check_header_mongrel "$LINENO" "pcre/pcre.h" "ac_cv_header_pcre_pcre_h" "$ac_includes_default" | ||
300 | -if test "x$ac_cv_header_pcre_pcre_h" = xyes; then : | ||
301 | - have_pcre="yes" | ||
302 | + if test "X$withval" != "Xno"; then | ||
303 | + if test "${PKG_CONFIG}libpcre2-8 --exists"; then | ||
304 | + pcrelib="pcre2" | ||
305 | + have_pcre="yes" | ||
306 | + found_pcre="yes" | ||
307 | + PCRE_HOME="$withval" | ||
308 | + PCRE_LIBS="${PKG_CONFIG} libpcre2-8 --libs" | ||
309 | + LDFLAGS="$PCRE_LIBS $save_LDFLAGS" | ||
310 | + fi | ||
311 | + LDFLAGS="$save_LDFLAGS" | ||
312 | + fi | ||
313 | else | ||
314 | - have_pcre="no" | ||
315 | + as_fn_error $? "libpcre not found. libpcre (e.g. libpcre-devel) is required in order to build freshclam and clamsubmit." "$LINENO" 5 | ||
316 | fi | ||
317 | |||
318 | |||
319 | - fi | ||
320 | - | ||
321 | - if test "x$have_pcre" = "xyes"; then | ||
322 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcre_compile in -lpcre" >&5 | ||
323 | -$as_echo_n "checking for pcre_compile in -lpcre... " >&6; } | ||
324 | -if ${ac_cv_lib_pcre_pcre_compile+:} false; then : | ||
325 | - $as_echo_n "(cached) " >&6 | ||
326 | -else | ||
327 | - ac_check_lib_save_LIBS=$LIBS | ||
328 | -LIBS="-lpcre $LIBS" | ||
329 | -cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
330 | -/* end confdefs.h. */ | ||
331 | - | ||
332 | -/* Override any GCC internal prototype to avoid an error. | ||
333 | - Use char because int might match the return type of a GCC | ||
334 | - builtin and then its argument prototype would still apply. */ | ||
335 | -#ifdef __cplusplus | ||
336 | -extern "C" | ||
337 | -#endif | ||
338 | -char pcre_compile (); | ||
339 | -int | ||
340 | -main () | ||
341 | -{ | ||
342 | -return pcre_compile (); | ||
343 | - ; | ||
344 | - return 0; | ||
345 | -} | ||
346 | -_ACEOF | ||
347 | -if ac_fn_c_try_link "$LINENO"; then : | ||
348 | - ac_cv_lib_pcre_pcre_compile=yes | ||
349 | -else | ||
350 | - ac_cv_lib_pcre_pcre_compile=no | ||
351 | -fi | ||
352 | -rm -f core conftest.err conftest.$ac_objext \ | ||
353 | - conftest$ac_exeext conftest.$ac_ext | ||
354 | -LIBS=$ac_check_lib_save_LIBS | ||
355 | -fi | ||
356 | -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcre_pcre_compile" >&5 | ||
357 | -$as_echo "$ac_cv_lib_pcre_pcre_compile" >&6; } | ||
358 | -if test "x$ac_cv_lib_pcre_pcre_compile" = xyes; then : | ||
359 | - have_pcre="yes" | ||
360 | -else | ||
361 | - have_pcre="no" | ||
362 | -fi | ||
363 | - | ||
364 | - fi | ||
365 | - fi | ||
366 | |||
367 | - CPPFLAGS="$save_CPPFLAGS" | ||
368 | - LDFLAGS="$save_LDFLAGS" | ||
369 | +if test "$pcrelib" = "pcre2"; then | ||
370 | + $as_echo "#define USING_PCRE2 1" >>confdefs.h | ||
371 | + { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling and linking with pcre2 from $PCRE_HOME" >&5 | ||
372 | + $as_echo "$as_me: Compiling and linking with pcre2 from $PCRE_HOME" >&6;} | ||
373 | fi | ||
374 | |||
375 | -if test "x$have_pcre" = "xyes"; then | ||
376 | - | ||
377 | -$as_echo "#define HAVE_PCRE 1" >>confdefs.h | ||
378 | - | ||
379 | - | ||
380 | - if test "$pcrelib" = "pcre2"; then | ||
381 | - | ||
382 | -$as_echo "#define USING_PCRE2 1" >>confdefs.h | ||
383 | - | ||
384 | - { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling and linking with pcre2 from $PCRE_HOME" >&5 | ||
385 | -$as_echo "$as_me: Compiling and linking with pcre2 from $PCRE_HOME" >&6;} | ||
386 | - else | ||
387 | - { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling and linking with pcre from $PCRE_HOME" >&5 | ||
388 | -$as_echo "$as_me: Compiling and linking with pcre from $PCRE_HOME" >&6;} | ||
389 | - fi | ||
390 | -fi | ||
391 | |||
392 | |||
393 | |||
394 | @@ -37002,33 +36668,27 @@ fi | ||
395 | |||
396 | fi | ||
397 | if test "x$PCRE_HOME" = "x"; then | ||
398 | - | ||
399 | - | ||
400 | $as_echo_n " pcre : " | ||
401 | if test "x$have_pcre" = "xno"; then : | ||
402 | - $as_echo "no (disabled)" | ||
403 | -elif test "x$have_pcre" = "xyes"; then : | ||
404 | - $as_echo "no" | ||
405 | -elif test "x$have_pcre" = "x"; then : | ||
406 | - $as_echo "no" | ||
407 | -else | ||
408 | - $as_echo "no ($have_pcre)" | ||
409 | -fi | ||
410 | - | ||
411 | + $as_echo "no (disabled)" | ||
412 | + elif test "x$have_pcre" = "xyes"; then : | ||
413 | + $as_echo "no" | ||
414 | + elif test "x$have_pcre" = "x"; then : | ||
415 | + $as_echo "no" | ||
416 | + else | ||
417 | + $as_echo "no ($have_pcre)" | ||
418 | + fi | ||
419 | else | ||
420 | - | ||
421 | - | ||
422 | $as_echo_n " pcre : " | ||
423 | if test "x$have_pcre" = "xno"; then : | ||
424 | - $as_echo "$PCRE_HOME (disabled)" | ||
425 | -elif test "x$have_pcre" = "xyes"; then : | ||
426 | - $as_echo "$PCRE_HOME" | ||
427 | -elif test "x$have_pcre" = "x"; then : | ||
428 | - $as_echo "$PCRE_HOME" | ||
429 | -else | ||
430 | - $as_echo "$PCRE_HOME ($have_pcre)" | ||
431 | -fi | ||
432 | - | ||
433 | + $as_echo "$PCRE_HOME (disabled)" | ||
434 | + elif test "x$have_pcre" = "xyes"; then : | ||
435 | + $as_echo "$PCRE_HOME" | ||
436 | + elif test "x$have_pcre" = "x"; then : | ||
437 | + $as_echo "$PCRE_HOME" | ||
438 | + else | ||
439 | + $as_echo "$PCRE_HOME ($have_pcre)" | ||
440 | + fi | ||
441 | fi | ||
442 | |||
443 | |||
diff --git a/recipes-scanners/clamav/files/libcamav_fix.patch b/recipes-scanners/clamav/files/libcamav_fix.patch new file mode 100644 index 0000000..736a3e6 --- /dev/null +++ b/recipes-scanners/clamav/files/libcamav_fix.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | Index: git/libclamav.pc.in | ||
2 | =================================================================== | ||
3 | --- git.orig/libclamav.pc.in | ||
4 | +++ git/libclamav.pc.in | ||
5 | @@ -6,7 +6,7 @@ includedir=@includedir@ | ||
6 | Name: libclamav | ||
7 | Description: A GPL virus scanner | ||
8 | Version: @PACKAGE_VERSION@ | ||
9 | -Libs: -L${libdir} -lclamav | ||
10 | +Libs: -lclamav | ||
11 | Libs.private: @LIBCLAMAV_LIBS@ | ||
12 | Cflags: -I${includedir} | ||
13 | |||
diff --git a/recipes-scanners/clamav/files/libclamav_fix.patch b/recipes-scanners/clamav/files/libclamav_fix.patch new file mode 100644 index 0000000..84e87e6 --- /dev/null +++ b/recipes-scanners/clamav/files/libclamav_fix.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | Index: git/libclamav/Makefile.in | ||
2 | =================================================================== | ||
3 | --- git.orig/libclamav/Makefile.in | ||
4 | +++ git/libclamav/Makefile.in | ||
5 | @@ -1328,7 +1328,7 @@ libclamav_nocxx_la_SOURCES = bytecode_no | ||
6 | libclamav_nocxx_la_CFLAGS = $(AM_CFLAGS) @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @ZLIB_CFLAGS@ @PCRE_CPPFLAGS@ | ||
7 | libclamav_la_LIBADD = @SSL_LIBS@ @JSON_LIBS@ @PCRE_LIBS@ @LIBCLAMAV_LIBS@ @ZLIB_LIBS@ @LIBLTDL@ $(XML_LIBS) $(IFACELIBADD) $(MSPACKLIBADD) $(LLVMLIBADD) libclamav_internal_utils.la @THREAD_LIBS@ @LIBM@ | ||
8 | libclamav_la_DEPENDENCIES = @LTDLDEPS@ $(IFACEDEP) $(LLVMDEP) $(MSPACKDEP) libclamav_internal_utils.la | ||
9 | -libclamav_la_CFLAGS = $(MSPACK_CFLAGS) $(AM_CFLAGS) $(YARA_CFLAGS) -DSEARCH_LIBDIR=\"$(libdir)\" @LIBCLAMAV_CPPFLAGS@ @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @ZLIB_CFLAGS@ @PCRE_CPPFLAGS@ @XML_CPPFLAGS@ | ||
10 | +libclamav_la_CFLAGS = $(MSPACK_CFLAGS) $(AM_CFLAGS) $(YARA_CFLAGS) @LIBCLAMAV_CPPFLAGS@ @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @ZLIB_CFLAGS@ @PCRE_CPPFLAGS@ @XML_CPPFLAGS@ | ||
11 | libclamav_la_LDFLAGS = @SSL_LDFLAGS@ @TH_SAFE@ @JSON_LDFLAGS@ \ | ||
12 | @LIBICONV@ $(XML_LIBS) -version-info @LIBCLAMAV_VERSION@ \ | ||
13 | -no-undefined $(am__append_8) | ||
14 | Index: git/libclamav/others.c | ||
15 | =================================================================== | ||
16 | --- git.orig/libclamav/others.c | ||
17 | +++ git/libclamav/others.c | ||
18 | @@ -132,10 +132,6 @@ static lt_dlhandle lt_dlfind(const char | ||
19 | lt_dlhandle rhandle; | ||
20 | unsigned i; | ||
21 | |||
22 | - if (lt_dladdsearchdir(SEARCH_LIBDIR)) { | ||
23 | - cli_dbgmsg("lt_dladdsearchdir failed for %s\n", SEARCH_LIBDIR); | ||
24 | - } | ||
25 | - | ||
26 | searchpath = lt_dlgetsearchpath(); | ||
27 | if (!searchpath) | ||
28 | searchpath = ""; | ||
29 | Index: git/clamav-config.in | ||
30 | =================================================================== | ||
31 | --- git.orig/clamav-config.in | ||
32 | +++ git/clamav-config.in | ||
33 | @@ -59,7 +59,7 @@ while test $# -gt 0; do | ||
34 | ;; | ||
35 | |||
36 | --libs) | ||
37 | - echo -L@libdir@ @LIBCLAMAV_LIBS@ | ||
38 | + echo @LIBCLAMAV_LIBS@ | ||
39 | ;; | ||
40 | |||
41 | *) | ||