Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clamav: use pcre2, add libxml2, bzip2 dependencies #54096

Closed
wants to merge 1 commit into from

Conversation

micahsnyder
Copy link
Contributor

Switch from pcre dependency to pcre2. Pcre is an older project
and lacks some optimizations and bug fixes found in pcre2.

Adds missing libxml2 dependency and bzip2 dependency (from macOS).

  • Have you followed the guidelines for contributing?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install <formula>)?

Switch from pcre dependency to pcre2. Pcre is an older project
and lacks some optimizations and bug fixes found in pcre2.

Adds missing libxml2 dependency and bzip2 dependency (from macOS).

Enables LLVM bytecode runtime. It is faster than the bytecode
interpreter (default).

Switch libjson-c linking to static, to prevent possible crashes with
applications that link with libclamav and another JSON library.

Add libiconv dependency. Libiconv detection in ClamAV appears to be a
little bit broken, but this may fix the macOS 10.13 build.
@micahsnyder
Copy link
Contributor Author

Updated commit to:

  • enable llvm bytecode runtime (better performance).
  • set libjson-c linking to static to avoid possible symbol collisions w/ other JSON libraries.
  • add libiconv dependency. I think libiconv may be provided by macOS 10.14, 10.15 but not 10.13. The previous GitHub Actions CI build failed 10.13. ClamAV's libiconv detection appears to be a tad broken so I'm not sure if this will help.

@micahsnyder
Copy link
Contributor Author

It helped! I think this PR is ready for merge.

@micahsnyder micahsnyder mentioned this pull request May 2, 2020
@chenrui333
Copy link
Member

Thanks @micahsnyder!!

@chenrui333 chenrui333 added the ready to merge PR can be merged once CI is green label May 2, 2020
@BrewTestBot
Copy link
Member

🤖 A scheduled task has triggered a merge.

@micahsnyder
Copy link
Contributor Author

micahsnyder commented May 4, 2020

Thanks @micahsnyder!!

@chenrui333 I'm seeing the following issue when I try to install now. Did I screw something up?

==> Downloading https://homebrew.bintray.com/bottles/clamav-0.102.2_1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/af/af683074259e803315ec885285e9fbf587d0ad477e6bec9b582b78f8750a04c6?__gda__=exp=1588621663~hmac=d3ff762e3a4725a5269465a1cc40918fabd2bdf584d2c4a40a5a912408c3d6f7&response-content-disposition=attachment%3Bfilename%3D%22clamav-0.102.2_1.catalina.bottle.tar.gz%22&response
######################################################################## 100.0%
Error: SHA256 mismatch
Expected: 544f511ddd1c68b88a93f017617c968a4e5d34fc6a010af15e047a76c5b16a9f
  Actual: af683074259e803315ec885285e9fbf587d0ad477e6bec9b582b78f8750a04c6
 Archive: /Users/micasnyd/Library/Caches/Homebrew/downloads/c8115fa3a36edbc086725f9fe785d7466f7d8ed6bb4c80d5851aaf8a030b0070--clamav-0.102.2_1.catalina.bottle.tar.gz
To retry an incomplete download, remove the file above.
Warning: Bottle installation failed: building from source.
...

Was there a hash for the bottle that I was supposed to manually update?

@Bo98
Copy link
Member

Bo98 commented May 4, 2020

Perhaps you are still on your branch locally? The bottle hash commit is pushed to master while merging: 26718d5

@micahsnyder
Copy link
Contributor Author

Perhaps you are still on your branch locally? The bottle hash commit is pushed to master while merging: 26718d5

That was it, thanks!
Sorry for the alarm. I'm a first time contributor to homebrew-core. I understand now. 👍

@robertleeblairjr
Copy link
Contributor

Perhaps you are still on your branch locally? The bottle hash commit is pushed to master while merging: 26718d5

This last patch has an unusual problem that I'm trying to track down as to whether it's this latest build or the VirusDB from ClamAV. Currently, the main.cvd and daily.cvd pass the database test but the bytecode.cvd fails. Plus, manually pushing the bytecode.cvd to the share directory where it should resides causes a SegFault 11 with the 'clamscan'. Here's the current output.

MacBook:~ robert$ freshclam ClamAV update process started at Tue May 5 06:23:30 2020 daily.cld database is up to date (version: 25802, sigs: 2349502, f-level: 63, builder: raynman) main.cvd database is up to date (version: 59, sigs: 4564902, f-level: 60, builder: sigmgr) bytecode database available for download (remote version: 331) Time: 2.3s, ETA: 0.0s [=============================>] 289.44KiB/289.44KiB Testing database: '/usr/local/Cellar/clamav/0.102.2_1/share/clamav/tmp.6d6d0/clamav-1a0959617dee3d51b875dd2e97aca7e8.tmp-bytecode.cvd' ... ERROR: Database load killed by signal 11 ERROR: Database test FAILED. ERROR: Unexpected error when attempting to update database: bytecode WARNING: fc_update_databases: fc_update_database failed: Test failed (8) ERROR: Database update process failed: Test failed (8) ERROR: Update failed.

If it failed for all three DBs then I would feel more assured that it was the ClamAV install. Anyone else having this odd problem?

@jconley
Copy link
Contributor

jconley commented May 5, 2020

regression of Homebrew/legacy-homebrew#41152 ?

@micahsnyder micahsnyder deleted the clam-0.102.2-pcre2 branch May 25, 2020 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge PR can be merged once CI is green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants