#999869 Support networkd-dispatcher (and modernize ifupdown scripts)

Package:
src:clamav
Source:
clamav
Submitter:
Sergio Durigan Junior
Date:
2024-07-10 13:21:05 UTC
Severity:
normal
Tags:
#999869#5
Date:
2021-11-17 23:33:30 UTC
From:
To:
Hello,

I am taking the liberty to file this bug in order to replicate the
following Merge Request:

https://salsa.debian.org/clamav-team/clamav/-/merge_requests/4

Ubuntu uses systemd-networkd and is working towards supporting
networkd-dispatcher instead of ifupdown. I'd like to propose this change
(to be attached in a future comment) so that Debian can also benefit
from this.

I noticed that the existing ifupdown script that clamav uses (a) could
use some code improvements, and (b) could be expanded to also handle
networkd-dispatcher.

I'm also proposing an addition to the clamav-freshclam.links file in
order to properly link the scripts under /etc/network/if-{up,down}.d/ to
/usr/lib/networkd-dispatcher/{routable,off}.d/, in order to prevent code
duplication.

I did a quick test inside an Ubuntu VM with the new version of the
package. I brought the network interface down and then up, and also
added a few temporary debugging statements in order to make sure that
the right scripts were being executed. Here's the log:

#999869#10
Date:
2021-11-17 23:39:07 UTC
From:
To:
Control: tags -1 + patch
[...]

Here it is.

Thank you,

#999869#17
Date:
2024-07-10 13:16:55 UTC
From:
To:
[+CC Sebastian, who seems to be most active maintaining ClamAV these days]

Hi all,

I'm bumping this old bug report, because I think it's still very relevant to support
modern networking tools like systemd-networkd or Netplan.

Having support for networkd-dispatcher in the if-up.d scripts and cross-linking them for
both tools, as proposed by Sergio is a very elegant solution, IMHO!

Can we get any opinion from the maintainers about the proposed patch?

Cheers,
   Lukas