diff options
author | Armin Kuster <akuster808@gmail.com> | 2020-03-22 16:20:05 +0000 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2020-03-22 09:27:59 -0700 |
commit | fa9c7a4ece38d3e6a5f4be6e11fb0a65d076450b (patch) | |
tree | 7e5e671f096e2e5899cd9801c784a9aa338050fb /recipes-scanners/clamav/files/fix_libcurl_check.patch | |
parent | 49e9cd9cb5b3565698debee8ae0ebaebc9140b27 (diff) | |
download | meta-security-wip2.tar.gz |
clamav: upgrade 102.2wip2
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'recipes-scanners/clamav/files/fix_libcurl_check.patch')
-rw-r--r-- | recipes-scanners/clamav/files/fix_libcurl_check.patch | 231 |
1 files changed, 231 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 | ||