mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-16 22:10:26 +00:00
Disable VirusCheck plugin
Not compatible with ClamAV >= 1.0.
This commit is contained in:
parent
bf176ae423
commit
759208d903
4 changed files with 10 additions and 34 deletions
34
.github/workflows/build.yml
vendored
34
.github/workflows/build.yml
vendored
|
|
@ -41,35 +41,7 @@ jobs:
|
||||||
- name: Install OS dependencies
|
- name: Install OS dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y clamav-daemon geoip-database libgeoip-dev gettext
|
sudo apt-get install -y geoip-database libgeoip-dev gettext
|
||||||
|
|
||||||
- name: Make ClamAV cache directory writeable for cache action
|
|
||||||
run: |
|
|
||||||
sudo chown -R runner:docker /var/lib/clamav
|
|
||||||
|
|
||||||
- name: ClamAV cache
|
|
||||||
id: cache-clamav
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: /var/lib/clamav
|
|
||||||
key: clamav-v1
|
|
||||||
|
|
||||||
- name: Restore ClamAV directory ownership
|
|
||||||
run: |
|
|
||||||
sudo chown -R clamav:clamav /var/lib/clamav
|
|
||||||
|
|
||||||
- name: Restart ClamAV Daemon
|
|
||||||
if: ${{ steps.cache-clamav.outputs.cache-hit == 'true' }}
|
|
||||||
run: |
|
|
||||||
sudo service clamav-daemon restart
|
|
||||||
|
|
||||||
- name: Download the ClamAV signature database
|
|
||||||
if: ${{ steps.cache-clamav.outputs.cache-hit != 'true' }}
|
|
||||||
run: |
|
|
||||||
sudo service clamav-freshclam stop
|
|
||||||
sudo freshclam
|
|
||||||
sudo service clamav-daemon restart
|
|
||||||
sudo service clamav-daemon status
|
|
||||||
|
|
||||||
- name: Git clone
|
- name: Git clone
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
@ -98,10 +70,6 @@ jobs:
|
||||||
python -m pip install -U hatchling hatch-vcs polib
|
python -m pip install -U hatchling hatch-vcs polib
|
||||||
python -m pip install -U tox coverage
|
python -m pip install -U tox coverage
|
||||||
|
|
||||||
- name: Wait for ClamAV to be ready
|
|
||||||
run: |
|
|
||||||
while ! test -S /run/clamav/clamd.ctl; do printf "."; sleep 1; done
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
python -m hatchling build -t sdist --hooks-only
|
python -m hatchling build -t sdist --hooks-only
|
||||||
|
|
|
||||||
|
|
@ -569,6 +569,10 @@ daemon must be installed.
|
||||||
**clamavconf=**\ *filename*
|
**clamavconf=**\ *filename*
|
||||||
Filename of **clamd.conf** config file.
|
Filename of **clamd.conf** config file.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
The VirusCheck plugin does not support ClamAV >= 1.0 and is disabled.
|
||||||
|
|
||||||
PdfParser
|
PdfParser
|
||||||
^^^^^^^^^
|
^^^^^^^^^
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,13 @@ class VirusCheck(_ContentPlugin):
|
||||||
self.clamav_conf = get_clamav_conf(canonical_clamav_conf())
|
self.clamav_conf = get_clamav_conf(canonical_clamav_conf())
|
||||||
if not self.clamav_conf:
|
if not self.clamav_conf:
|
||||||
log.warn(LOG_PLUGIN, "clamav daemon not found for VirusCheck plugin")
|
log.warn(LOG_PLUGIN, "clamav daemon not found for VirusCheck plugin")
|
||||||
|
log.warn(
|
||||||
|
LOG_PLUGIN, _("VirusCheck plugin does not support ClamAV >= 1.0.")
|
||||||
|
)
|
||||||
|
|
||||||
def applies_to(self, url_data):
|
def applies_to(self, url_data):
|
||||||
"""Check for clamav and extern."""
|
"""Check for clamav and extern."""
|
||||||
|
return False # XXX Plugin disabled
|
||||||
return self.clamav_conf and not url_data.extern[0]
|
return self.clamav_conf and not url_data.extern[0]
|
||||||
|
|
||||||
def check(self, url_data):
|
def check(self, url_data):
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ def has_clamav():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
need_clamav = _need_func(has_clamav, "ClamAV")
|
need_clamav = _need_func(has_clamav, "ClamAV", False) # XXX Plugin disabled
|
||||||
|
|
||||||
|
|
||||||
@lru_cache(1)
|
@lru_cache(1)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue