FS#79544 - [libredefender] Needs rebuild against clamav 1.2.0
Attached to Project:
Arch Linux
Opened by Michal Wojdyla (micwoj92) - Saturday, 02 September 2023, 18:01 GMT
Last edited by kpcyrd (kpcyrd) - Sunday, 03 September 2023, 22:42 GMT
Opened by Michal Wojdyla (micwoj92) - Saturday, 02 September 2023, 18:01 GMT
Last edited by kpcyrd (kpcyrd) - Sunday, 03 September 2023, 22:42 GMT
|
Details
Description: After clamav update soname version was bumped,
but application was not rebuilt resulting in error:
warning: cannot resolve "libclamav.so=11-64", a dependency of "libredefender" :: The following package cannot be upgraded due to unresolvable dependencies: libredefender Additional info: * package version: 0.6.0-2 * config and/or log files N/A * link to upstream bug report: N/A Steps to reproduce: 1. try to install libredefender 2. get error. |
This task depends upon
Closed by kpcyrd (kpcyrd)
Sunday, 03 September 2023, 22:42 GMT
Reason for closing: Fixed
Additional comments about closing: 0.7.0-1
Sunday, 03 September 2023, 22:42 GMT
Reason for closing: Fixed
Additional comments about closing: 0.7.0-1
```
Compiling clamav-rs v0.5.5
error[E0308]: mismatched types
--> /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clamav-rs-0.5.5/src/error.rs:23:47
|
23 | let ptr = clamav_sys::cl_strerror(self.code);
| ----------------------- ^^^^^^^^^ expected `cl_error_t`, found `i32`
| |
| arguments to this function are incorrect
|
note: function defined here
--> /usr/src/debug/libredefender/libredefender-0.6.0/target/release/build/clamav-sys-e936b018e2cdf245/out/bindings.rs:306:12
|
306 | pub fn cl_strerror(clerror: cl_error_t) -> *const ::std::os::raw::c_char;
| ^^^^^^^^^^^
For more information about this error, try `rustc --explain E0308`.
error: could not compile `clamav-rs` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Build failed, check /var/lib/archbuild/extra-x86_64/chris-1/build
```
kpcyrd has a fork of clamav-rs bindings (with fix for clamav 1.0) , but issues are not enabled there.
Edit:
I just see you got different error than me, how did you try to build it?
```
Compiling colored v2.0.0
error[E0004]: non-exhaustive patterns: `cl_engine_field::CL_ENGINE_CACHE_SIZE` not covered
--> /build/.cargo/git/checkouts/clamav-rs-c584debbcab03daf/93b5ddc/src/engine.rs:447:11
|
447 | match field {
| ^^^^^ pattern `cl_engine_field::CL_ENGINE_CACHE_SIZE` not covered
|
note: `cl_engine_field` defined here
--> /usr/src/debug/libredefender/libredefender-0.6.0/target/release/build/clamav-sys-e936b018e2cdf245/out/bindings.rs:221:5
|
196 | pub enum cl_engine_field {
| ------------------------
...
221 | CL_ENGINE_CACHE_SIZE = 24,
| ^^^^^^^^^^^^^^^^^^^^ not covered
= note: the matched value is of type `cl_engine_field`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
483 ~ cl_engine_field::CL_ENGINE_PE_DUMPCERTS => EngineValueType::U32,
484 ~ cl_engine_field::CL_ENGINE_CACHE_SIZE => todo!(),
|
For more information about this error, try `rustc --explain E0004`.
error: could not compile `clamav-rs` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
```
I build like so:
```
$ pkgctl repo clone libredefender
$ pkgctl build --repo extra --rebuild libredefender
```
Note that this bug also triggered a bug[0] in devtools, usually one does not need to specify --repo and just `pkgctl build --rebuild libredefender` would be enough.
[0] https://gitlab.archlinux.org/archlinux/devtools/-/issues/189
[1] https://github.com/Cisco-Talos/clamav/commit/e70493cf61b0601239e92f0496694809d005f758
[2] https://github.com/kpcyrd/clamav-rs/blob/clamav-1.0/src/engine.rs#L472