Skip to content

Add ClamAV 1.5 APIs and bump version to 1.5.0#6

Merged
val-ms merged 3 commits into
mainfrom
CLAM-2881-clamav-1.5-apis
May 5, 2026
Merged

Add ClamAV 1.5 APIs and bump version to 1.5.0#6
val-ms merged 3 commits into
mainfrom
CLAM-2881-clamav-1.5-apis

Conversation

@val-ms

@val-ms val-ms commented Nov 12, 2025

Copy link
Copy Markdown
Contributor

Change build behavior to prioritize manually specified header
and library paths, when specified.

Change the environment variable names used when manually specifying
the header and library paths from:

  • CLAMAV_SOURCE
  • CLAMAV_BUILD
  • OPENSSL_ROOT_DIR

To:

  • CLAMAV_INCLUDE
  • CLAMAV_LIBRARY
  • OPENSSL_INCLUDE

Pkgconfig (unix) and Vcpkg (Windows) are now only used when the builder
does not provide explicit paths for the required files.
This is to prevent pkgconfig and vcpkg to be unintentionally used when
present on a system but a specific version of either dependency is
desired.

CLAM-2881

@val-ms val-ms force-pushed the CLAM-2881-clamav-1.5-apis branch from 4676c7a to ddd08b5 Compare March 12, 2026 21:29
@val-ms val-ms changed the title Add ClamAV 1.5 APIs and bump version to 1.1.0 Add ClamAV 1.5 APIs and bump version to 1.5.0 Mar 12, 2026
@val-ms val-ms requested a review from Copilot March 12, 2026 21:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates clamav-sys to target ClamAV 1.5.x, extending the generated bindings while changing build-time dependency discovery to prefer explicitly provided include/library paths over auto-discovery.

Changes:

  • Add additional ClamAV 1.5 API symbols to bindgen allowlists and bump crate version to 1.5.0.
  • Rework build.rs dependency discovery to prioritize manual paths (CLAMAV_LIBRARY/CLAMAV_INCLUDE) and rename OpenSSL override handling to OPENSSL_INCLUDE.
  • Update build documentation and add repository policy docs (SECURITY.md, CODE_OF_CONDUCT.md).

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/lib.rs Removes transmute usage in enum conversions (safer cast-based conversions).
build.rs Adds ClamAV 1.5 allowlisted symbols and implements manual-first discovery via env vars.
README.md Documents the new discovery order and override variables (plus updated examples).
Cargo.toml Bumps crate version to 1.5.0 and updates author list.
SECURITY.md Adds a security policy and vulnerability reporting guidance.
CODE_OF_CONDUCT.md Adds a community code of conduct.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread README.md Outdated
Comment thread SECURITY.md
Comment thread build.rs Outdated
Comment thread build.rs Outdated
Comment thread build.rs Outdated
Comment thread build.rs Outdated
Comment thread build.rs Outdated
Comment thread README.md Outdated
@val-ms val-ms force-pushed the CLAM-2881-clamav-1.5-apis branch 2 times, most recently from a65d660 to d60df56 Compare March 12, 2026 23:17
@val-ms val-ms requested a review from Copilot March 16, 2026 16:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread src/lib.rs
Comment thread src/lib.rs
Comment thread src/lib.rs
Comment thread build.rs
Comment thread build.rs Outdated
Comment thread SECURITY.md
@val-ms val-ms force-pushed the CLAM-2881-clamav-1.5-apis branch from 5a23657 to 52ba7d2 Compare March 16, 2026 21:30
Change build behavior to prioritize manually specified header
and library paths, when specified.

Change the environment variable names used when manually specifying
the header and library paths from:
- CLAMAV_SOURCE
- CLAMAV_BUILD
- OPENSSL_ROOT_DIR

To:
- CLAMAV_INCLUDE
- CLAMAV_LIBRARY
- OPENSSL_INCLUDE

Pkgconfig (unix) and Vcpkg (Windows) are now only used when the builder
does not provide explicit paths for the required files.
This is to prevent pkgconfig and vcpkg to be unintentionally used when
present on a system but a specific version of either dependency is
desired.

CLAM-2881
@val-ms val-ms force-pushed the CLAM-2881-clamav-1.5-apis branch 6 times, most recently from 7650ff3 to b6dfff0 Compare March 18, 2026 20:07
@val-ms val-ms force-pushed the CLAM-2881-clamav-1.5-apis branch from b6dfff0 to 568461c Compare March 18, 2026 20:34
Detect CLAMAV_VERSION_NUM from the installed headers at build time and set a cfg for ClamAV 1.0.0 or newer. Use that cfg to call cl_strerror with cl_error_t for newer releases and with int for older releases, since bindgen reflects the API shape provided by the installed ClamAV headers and older vcpkg packages still expose the pre-1.0.0 signature.
@val-ms val-ms force-pushed the CLAM-2881-clamav-1.5-apis branch from 5521584 to 676aedb Compare March 19, 2026 01:09
@val-ms val-ms merged commit d392301 into main May 5, 2026
5 checks passed
@val-ms val-ms deleted the CLAM-2881-clamav-1.5-apis branch May 5, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants