Mailing List Archive

[clamav-users] Solaris users in a bind
I need some help. The clamav.net site does not offer downloads for Solaris and the link for Solaris directs us to the OpenCSW.org site.

Does anyone have a contact at CSW? ClamAV 0.100.2 is the newest version available to Solaris users, and has not been updated in time to prevent a cut off from signature update downloads. I have spent the weekend, and the better part of Mon/Tue trying to get userland tools to compile on Solaris 11.3 (unsuccessfully), which seems to be a prerequisite to compiling clamav from source.

Can anyone offer a instructions for getting the 103/104 source to compile on Solaris (preferably 11.3) or work-around (that won't get me fired)?

Many Thanks,
Dan Liston

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Solaris users in a bind [ In reply to ]
On 03/11/2021 18:44, Liston, Daniel (DLISTON) via clamav-users wrote:
> I need some help. The clamav.net site does not offer downloads for Solaris and the link for Solaris directs us to the OpenCSW.org site.
>
> Does anyone have a contact at CSW? ClamAV 0.100.2 is the newest version available to Solaris users, and has not been updated in time to prevent a cut off from signature update downloads. I have spent the weekend, and the better part of Mon/Tue trying to get userland tools to compile on Solaris 11.3 (unsuccessfully), which seems to be a prerequisite to compiling clamav from source.
>
> Can anyone offer a instructions for getting the 103/104 source to compile on Solaris (preferably 11.3) or work-around (that won't get me fired)?
>
This worked on 11.3 and 11.4 to build 0.103.3.

I had previously built GCC 10 from source, and have Studio as well.

The four shared objects in /usr/local: I like to keep OpenSSL right up
to date, and I have libiconv for other reasons, the libbz2 may be a
hang-over from 10. :-)

Cheers,
Gary B-)

-----------------------------------------------------
#! /bin/bash
#
# Fix PATH...
export
PATH=/bin:/usr/bin:/sbin:/opt/developerstudio12.6/bin:/usr/local/bin:.
echo $PATH
hash -r
#
# Fix configure files.
echo edit ... find . -name configure replace BDRT with BCDRT

for i in `find . -name configure`
do
sed 's/BDRT/BCDRT/' $i > /tmp/configure.$$
mv /tmp/configure.$$ $i
chmod a+x $i
done

env CONFIG_SHELL=/bin/bash \
/bin/bash ./configure \
CONFIG_SHELL=/bin/bash \
CFLAGS="-m32 -I/usr/local/include" \
CXXFLAGS="-m32 -I/usr/local/include" \
LDFLAGS="-m32 -L/usr/local/lib -R/usr/local/lib" \
--disable-ipv6 \
--disable-silent-rules \
--disable-check \
--prefix=/usr/local


RR=$?
if [ $RR != 0 ]
then
echo "Bad conf!"
exit $RR
fi

exit $?

-----------------------------------------------------


To Install:
sudo svcadm disable svc:/network/postfix:default
sudo /etc/init.d/freshclam stop
sudo /etc/init.d/clamsmtp stop
sudo /etc/init.d/clamd stop

sudo gmake install

sudo /etc/init.d/clamd start
sleep 60
sudo /etc/init.d/freshclam start
sudo /etc/init.d/clamsmtp start
sudo svcadm enable svc:/network/postfix:default

-----------------------------------------------------


/usr/local/lib/libiconv.so.2
/usr/local/lib/libbz2.so.1.0
/usr/local/lib/libssl.so.1.1
/usr/local/lib/libcrypto.so.1.1


Cheers,
Gary B-)

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Solaris users in a bind [ In reply to ]
On Wed, Nov 03, 2021 at 07:44:21AM +0000, Liston, Daniel (DLISTON) via clamav-users wrote:
>
> Can anyone offer a instructions for getting the 103/104 source to compile
> on Solaris (preferably 11.3) or work-around (that won't get me fired)?

You really should upgrade to Solaris 11.4, atleast it has all required
dependencies out of the box.

There was already discussion on list:
https://marc.info/?l=clamav-users&m=162815724431511&w=2

If it's not possible, then you are pretty much doomed to compile all
dependencies yourself..


_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Solaris users in a bind [ In reply to ]
Hi there,

On Wed, 3 Nov 2021, Liston, Daniel (DLISTON) via clamav-users wrote:

> Can anyone offer a instructions for getting the 103/104 source to
> compile on Solaris (preferably 11.3) or work-around (that won't get
> me fired)?

Why not set up a virtual machine? You'll need to give it enough RAM,
so depending on your system(s) and how you operate them you might need
either to add RAM to the box or run the VM only when you need to scan,
but you could more or less run any OS that you choose in the VM so you
could choose one for which there's likely to be an up to date ClamAV
package for the foreseeable future. I've used VirtualBox for a good
long while, and although there have been a few niggles (most notably a
problem syncing the system clocks, which has occasionally required a
reboot of the VMs to get them back on track and I'm still not sure if
the problem is fixed) generally speaking they perform very adequately.
However I don't use them for scanning, so I can't vouch for their use
in that application. Perhaps you could help us here by trying it. :)
If you're unsure about it let me know, I can offer you some pointers.

Alternatively for a few tens of dollars you could set up a Raspberry
Pi just for scanning. That's what we do. Even the fastest Pi has
fairly modest performance compared with typical desktop PCs from the
past decade. That might be an issue for you, but we only scan mail
and my (homebrew) milters are very choosy about what gets scanned so
the performance of the Pi4B which we use is more than adequate.

(In any case, do you know of an occasion where a Solaris box has been
compromised by something which ClamAV would have been able to detect? :)

--

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Solaris users in a bind [ In reply to ]
On 03/11/2021 20:16, G.W. Haywood via clamav-users wrote:
> Hi there,
>
> On Wed, 3 Nov 2021, Liston, Daniel (DLISTON) via clamav-users wrote:
>
>> Can anyone offer a instructions for getting the 103/104 source to
>> compile on Solaris (preferably 11.3) or work-around (that won't get
>> me fired)?
>
> Why not set up a virtual machine?  You'll need to give it enough RAM,
> so depending on your system(s) and how you operate them you might need

(Cough) - SPARC - (Cough).

Cheers,
Gary B-)


_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Solaris users in a bind [ In reply to ]
Hi there,

On Wed, 3 Nov 2021, Gary R. Schmidt wrote:
> On 03/11/2021 20:16, G.W. Haywood via clamav-users wrote:
>> On Wed, 3 Nov 2021, Liston, Daniel (DLISTON) via clamav-users wrote:
>>
>>> Can anyone offer a instructions for getting the 103/104 source to
>>> compile on Solaris (preferably 11.3) or work-around (that won't get
>>> me fired)?
>>
>> Why not set up a virtual machine?? You'll need to give it enough RAM,
>> so depending on your system(s) and how you operate them you might need
>
> (Cough) - SPARC - (Cough).

Sorry?

https://www.oracle.com/solaris/solaris11/downloads/solaris11-vm-templates-downloads.html

My second question styled differently:

https://www.fujitsu.com/global/products/computing/servers/unix/sparc-enterprise/software/solaris11/

--

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Solaris users in a bind [ In reply to ]
On 03/11/2021 22:17, G.W. Haywood via clamav-users wrote:
> Hi there,
>
> On Wed, 3 Nov 2021, Gary R. Schmidt wrote:
>> On 03/11/2021 20:16, G.W. Haywood via clamav-users wrote:
>>> On Wed, 3 Nov 2021, Liston, Daniel (DLISTON) via clamav-users wrote:
>>>
>>>> Can anyone offer a instructions for getting the 103/104 source to
>>>> compile on Solaris (preferably 11.3) or work-around (that won't get
>>>> me fired)?
>>>
>>> Why not set up a virtual machine?  You'll need to give it enough RAM,
>>> so depending on your system(s) and how you operate them you might need
>>
>> (Cough) - SPARC - (Cough).
>
> Sorry?
>
> https://www.oracle.com/solaris/solaris11/downloads/solaris11-vm-templates-downloads.html
>
That's for x64 systems. And I find VirtualBox quite useful on x64
Solaris systems.

> My second question styled differently:
>
> https://www.fujitsu.com/global/products/computing/servers/unix/sparc-enterprise/software/solaris11/
> Well, yes, there are various VM images available, and if (a) their SPARC
box(es) are set up using LDOMs, and (b) there is no problem with them
installing such an image into an LDOM, well, the OP could do that.

But that doesn't answer the question of how to build on Solaris.

Cheers,
Gary B-)

P.S. I work for Fujitsu, it's always amusing to see one of our links
quoted. :-)




_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Solaris users in a bind [ In reply to ]
Hi there,

On Wed, 3 Nov 2021, Gary R. Schmidt wrote:

> ... doesn't answer the question of how to build on Solaris.

True enough. Perhaps I should have made it more clear that I was
suggesting that there may be alternatives to banging heads on walls.

Not doing it being one of them - and what I'll do now.

--

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Solaris users in a bind [ In reply to ]
On 03/11/2021 22:59, G.W. Haywood via clamav-users wrote:
> Hi there,
>
> On Wed, 3 Nov 2021, Gary R. Schmidt wrote:
>
>> ... doesn't answer the question of how to build on Solaris.
>
> True enough.  Perhaps I should have made it more clear that I was
> suggesting that there may be alternatives to banging heads on walls.
>
> Not doing it being one of them - and what I'll do now.
>
The OP (and I (and other Solaris/HP-UX/AIX/non-BSD-UNIX users)) have a
problem anyway, with ClamAV becoming non-portable in the future, what
will we do about scanning email?

It seems obvious that we should just bung a supported VM of some recent
vintage somewhere, or sneak a Pi into a rack, and then do it remotely,
are there simple recipes out there for how to do it?

I know I could JFGI but a pointer to an accurate one always helps. :-)

Cheers,
Gary B-)

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Solaris users in a bind [ In reply to ]
Hi there,

On Wed, 3 Nov 2021, Gary R. Schmidt wrote:

> On 03/11/2021 22:59, G.W. Haywood via clamav-users wrote:
>> On Wed, 3 Nov 2021, Gary R. Schmidt wrote:
>>
>>> ... doesn't answer the question of how to build on Solaris.
>>
>> True enough. Perhaps I should have made it more clear that I was
>> suggesting that there may be alternatives ...
>>
> The OP (and I (and other Solaris/HP-UX/AIX/non-BSD-UNIX users)) have a
> problem anyway, with ClamAV becoming non-portable in the future, what will we
> do about scanning email?
>
> It seems obvious that we should just bung a supported VM of some recent
> vintage somewhere, or sneak a Pi into a rack, and then do it remotely, are
> there simple recipes out there for how to do it?
>
> I know I could JFGI but a pointer to an accurate one always helps. :-)

JFGI is a new one to me but I think I get the message. :)

Up until the changeover from Autotools to Cmake it was straightforward
to build on the Pi.

Building the release candidates of ClamAV 0.104 on the Pi did give me
some troubles but it seemed much easier for the most recent rc. When
I get a minute I'll run through the process on another one of our Pis
which hasn't done it before, and make some notes. With luck I'll be
able to use the new ClamAV release (due on Nov. 4th) for the exercise.
I've just run through the prerequisites as detailed in

https://docs.clamav.net/manual/Installing/Installing-from-source-Unix.html#ubuntu--debian

and

https://docs.clamav.net/manual/Installing/Installing-from-source-Unix.html#adding-new-system-user-and-group

which is basically just this script:

8<----------------------------------------------------------------------
#!/bin/bash
sudo groupadd clamav
sudo useradd -g clamav -s /bin/false -c "Clam Antivirus" clamav
sudo apt-get update && apt-get install -y \
gcc make pkg-config python3 python3-pip python3-pytest valgrind \
check libbz2-dev libcurl4-openssl-dev libjson-c-dev libmilter-dev \
libncurses5-dev libpcre2-dev libssl-dev libxml2-dev zlib1g-dev
python3 -m pip install --user cmake
8<----------------------------------------------------------------------

That should have set up the build environment ready for 'tar xzvf...'.
No issues so far. This was on an approximation to Raspian Bullseye, I
used 'script' to record the session in case later we find oddities...

Once you have it built it's just a matter of configuring a TCP port on
which clamd will listen and pointing the scanner processes to it. If
you run a filesystem scan that is clamdscan of course, not clamscan.
If it's mail, and you'd normally be using a milter, then assuming the
milter can use TCP for connections to the scanner just configure the
milter to use the same TCP socket. If it can't (or it isn't a milter)
you'll likely need to work through the docs.

To be able to use a milter written in C, Sendmail needs its libmilter
library to be built. The upstream source by default doesn't build it
so you just have to tweak the configuration before building (and you
might need to mess about to get pthread support). For the details on
Postfix, Exim etc. I'm afraid I'm not up to date. There's a choice of
several milters. Clamav-milter is supplied with the ClamAV tarball,
works with Sendmail, and can use TCP, but I'm not sure on the status
of its support. At one time I thought it was part of what you might
call the ClamAV suite, but the current Website seems to be saying that
it's considered to be third-party software. Our homebrew milters are
written in Perl, as I've mentioned here in the past; they'd be way OTT
for most people but if all else failed I'd be able to publish a simple
one. The Perl milters don't need the libmilter library to communicate
with Sendmail, they use a Perl module for that. It's the development
version of Sendmail::PMilter, which is available from CPAN:

https://metacpan.org/release/GWHAYWOOD/Sendmail-PMilter-1.20_03/view/lib/Sendmail/PMilter.pm

We've been using more or less that version for several years. Older
versions suffer from several issues and shouldn't be used in new work.

HTH

--

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Solaris users in a bind [ In reply to ]
G.W. Haywood via clamav-users wrote:
> I've used VirtualBox for a good
> long while, and although there have been a few niggles (most notably a
> problem syncing the system clocks, which has occasionally required a
> reboot of the VMs to get them back on track and I'm still not sure if
> the problem is fixed) generally speaking they perform very adequately.

Not related to the main question at hand but, at least with Ubuntu
guests, I've found when the clock gets out of sync it can be corrected with:
sudo systemctl restart vboxadd-service.service
Saves restarting the whole VM, which isn't always convenient depending
what you're doing at the time. I'm pretty sure it's
"vboxadd-service.service" that does it but, if not, try restarting
"vboxadd.service" as well (without the extra "-service" bit in the
name). It's definitely one or the other of those that does it for me.
There might be a similar service that can just be restarted for other
distros.

--
Mark.


_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Solaris users in a bind [ In reply to ]
Hi there,

On Wed, 3 Nov 2021, G.W. Haywood wrote:
> On Wed, 3 Nov 2021, Gary R. Schmidt wrote:
>
>> ... what will we do about scanning email?
>>
>> It seems obvious that we should just bung a supported VM of some recent
>> vintage somewhere, or sneak a Pi into a rack, and then do it remotely, are
>> there simple recipes out there for how to do it? ...
>
> Up until the changeover from Autotools to Cmake it was straightforward
> to build on the Pi.
>
> Building the release candidates of ClamAV 0.104 on the Pi did give me
> some troubles but it seemed much easier for the most recent rc. When
> I get a minute I'll run through the process on another one of our Pis
> which hasn't done it before, and make some notes. With luck I'll be
> able to use the new ClamAV release (due on Nov. 4th) for the exercise.
> I've just run through the prerequisites as detailed in
>
> https://docs.clamav.net/manual/Installing/Installing-from-source-Unix.html#ubuntu--debian
>
> and
>
> https://docs.clamav.net/manual/Installing/Installing-from-source-Unix.html#adding-new-system-user-and-group
>
> which is basically just this script:
>
> 8<----------------------------------------------------------------------
> #!/bin/bash
> sudo groupadd clamav
> sudo useradd -g clamav -s /bin/false -c "Clam Antivirus" clamav
> sudo apt-get update && apt-get install -y \
> gcc make pkg-config python3 python3-pip python3-pytest valgrind \
> check libbz2-dev libcurl4-openssl-dev libjson-c-dev libmilter-dev \
> libncurses5-dev libpcre2-dev libssl-dev libxml2-dev zlib1g-dev
> python3 -m pip install --user cmake
> 8<----------------------------------------------------------------------
>
> That should have set up the build environment ready for 'tar xzvf...'.
> No issues so far. This was on an approximation to Raspian Bullseye, I
> used 'script' to record the session in case later we find oddities...

This morning I downloaded the 0.104.1 tarball and extracted it to ~/temp/
on the Pi3B+ which I use as my desktop thin client.

The first thing that I noticed (because I was looking for it) was that
the error in INSTALL.md allegedly fixed by Micah

https://lists.clamav.net/pipermail/clamav-users/2021-October/011997.html

wasn't fixed. The INSTALL.md on Github isn't the one in the tarball.

HOW IN HELL CAN THAT HAPPEN?

I'll keep banging on about Sourcefire's quality control until it seems
to me that *somebody* there is taking it seriously.

I attempted to build:

$ cd ~/temp/
$ tar xzf clamav---
$ cd clamav----
$ mkdir build
$ cd build
$ cmake .. -D CMAKE_BUILD_TYPE="Release"
$ cmake --build . --config Release

The first few attempts failed because cmake/Python/modules but eventually
it compiled with just a few (well, three hundred and sixty-one) warnings.
IMHO compilations shoulld be SILENT unless something is wrong.

Then I tried to install it with

$ sudo cmake --build . --config Release --target install

and gave up after the fourth attempt. Didn't seem to want to use the
user-installed version of cmake even after explicitly setting the PATH
and linking to the files in ~/.local/bin/ from /usr/local/bin/. So I
installed cmake system-wide, then

# cmake --build . --config Release --target install

and finally:

# freshclam
Creating missing database directory: /usr/local/share/clamav
Assigned ownership of database directory to user "clamav".
ClamAV update process started at Thu Nov 4 10:59:02 2021
daily database available for download (remote version: 26343)
...
Testing database: '/usr/local/share/clamav/tmp.d4d23352f9/clamav-1bce76...
Database test passed.
daily.cvd updated (version: 26342, sigs: 1941589, f-level: 90, builder: raynman)
Received an older daily CVD than was advertised. We'll retry so the incremental update will ensure we're up-to-date.
daily database available for update (local version: 26342, remote version: 26343)
Current database is 1 version behind.
Downloading database patch # 26343...
...
Testing database: '/usr/local/share/clamav/tmp.d4d23352f9/clamav-a85a10...
Database test passed.
daily.cld updated (version: 26343, sigs: 1941807, f-level: 90, builder: raynman)
main database available for download (remote version: 62)
...
Testing database: '/usr/local/share/clamav/tmp.d4d23352f9/clamav-428c412...
Database test passed.
main.cvd updated (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
bytecode database available for download (remote version: 333)
...
Testing database: '/usr/local/share/clamav/tmp.d4d23352f9/clamav-6e1b2d1...
Database test passed.
bytecode.cvd updated (version: 333, sigs: 92, f-level: 63, builder: awillia2)
8<----------------------------------------------------------------------

It seems a little strange that freshclam found this:

* daily database available for download (remote version: 26343)

but then did this:

* daily.cvd updated (version: 26342, sigs: 1941589, f-level: 90, builder: raynman)

smartly followed by this:

* daily database available for update (local version: 26342, remote version: 26343)

and this:

* Downloading database patch # 26343...

and this:

* daily.cld updated (version: 26343, sigs: 1941807, f-level: 90, builder: raynman)

but otherwise things seem to have worked so I'll let others worry
about that. The poor ol' Pi3B+ struggled a bit to test the database
because it's driven into swap, but it did eventually finish OK.

I didn't try to start clamd as there isn't nearly enough RAM on the
Pi3B+ and I didn't want to crash it.

So there you have it. Not exactly a breeze but a great deal less
trouble than working with a completely different architecture.

--

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Solaris users in a bind [ In reply to ]
Hey Ged,

Per your comments about INSTALL.md:
The fix was made in our "main" branch which goes towards all future feature releases. We always fix things in "main" first, then backport to the published releases as needed. This way we don't accidentally fix things in a patch release but forget to include the fix towards the next release and have the same bug happen all over again.

In this case, it would have been good to backport this documentation fix to the 0.104 release (our "rel/0.104" branch). So, as you observed, the 0.104 release branch is different from the main (default) branch:

* 0.104 release branch: https://github.com/Cisco-Talos/clamav/blob/rel/0.104/INSTALL.md
* main (towards 0.105): https://github.com/Cisco-Talos/clamav/blob/main/INSTALL.md

If you're interested in learning more about our branching strategy, we have more information here: https://docs.clamav.net/manual/Development/clamav-git-work-flow.html

Per your comments about the daily database update oddity:
Our web team and ops team's have done their to clear Cloudflare's cache when we publish new databases. Despite this, Cloudflare frequently serves up an older version of daily.cvd. What you observed is FreshClam detecting that the version downloaded does not match the version advertised. FreshClam in 0.103.3 and newer is smart enough to update the rest of the way using the CDIFF patches.

I hope that helps.

-Micah

Micah Snyder
ClamAV Development
Talos
Cisco Systems, Inc.
________________________________
From: clamav-users <clamav-users-bounces@lists.clamav.net> on behalf of G.W. Haywood via clamav-users <clamav-users@lists.clamav.net>
Sent: Thursday, November 4, 2021 6:36 AM
To: ClamAV users ML <clamav-users@lists.clamav.net>
Cc: G.W. Haywood <clamav@jubileegroup.co.uk>
Subject: Re: [clamav-users] Solaris users in a bind

Hi there,

On Wed, 3 Nov 2021, G.W. Haywood wrote:
> On Wed, 3 Nov 2021, Gary R. Schmidt wrote:
>
>> ... what will we do about scanning email?
>>
>> It seems obvious that we should just bung a supported VM of some recent
>> vintage somewhere, or sneak a Pi into a rack, and then do it remotely, are
>> there simple recipes out there for how to do it? ...
>
> Up until the changeover from Autotools to Cmake it was straightforward
> to build on the Pi.
>
> Building the release candidates of ClamAV 0.104 on the Pi did give me
> some troubles but it seemed much easier for the most recent rc. When
> I get a minute I'll run through the process on another one of our Pis
> which hasn't done it before, and make some notes. With luck I'll be
> able to use the new ClamAV release (due on Nov. 4th) for the exercise.
> I've just run through the prerequisites as detailed in
>
> https://docs.clamav.net/manual/Installing/Installing-from-source-Unix.html#ubuntu--debian
>
> and
>
> https://docs.clamav.net/manual/Installing/Installing-from-source-Unix.html#adding-new-system-user-and-group
>
> which is basically just this script:
>
> 8<----------------------------------------------------------------------
> #!/bin/bash
> sudo groupadd clamav
> sudo useradd -g clamav -s /bin/false -c "Clam Antivirus" clamav
> sudo apt-get update && apt-get install -y \
> gcc make pkg-config python3 python3-pip python3-pytest valgrind \
> check libbz2-dev libcurl4-openssl-dev libjson-c-dev libmilter-dev \
> libncurses5-dev libpcre2-dev libssl-dev libxml2-dev zlib1g-dev
> python3 -m pip install --user cmake
> 8<----------------------------------------------------------------------
>
> That should have set up the build environment ready for 'tar xzvf...'.
> No issues so far. This was on an approximation to Raspian Bullseye, I
> used 'script' to record the session in case later we find oddities...

This morning I downloaded the 0.104.1 tarball and extracted it to ~/temp/
on the Pi3B+ which I use as my desktop thin client.

The first thing that I noticed (because I was looking for it) was that
the error in INSTALL.md allegedly fixed by Micah

https://lists.clamav.net/pipermail/clamav-users/2021-October/011997.html

wasn't fixed. The INSTALL.md on Github isn't the one in the tarball.

HOW IN HELL CAN THAT HAPPEN?

I'll keep banging on about Sourcefire's quality control until it seems
to me that *somebody* there is taking it seriously.

I attempted to build:

$ cd ~/temp/
$ tar xzf clamav---
$ cd clamav----
$ mkdir build
$ cd build
$ cmake .. -D CMAKE_BUILD_TYPE="Release"
$ cmake --build . --config Release

The first few attempts failed because cmake/Python/modules but eventually
it compiled with just a few (well, three hundred and sixty-one) warnings.
IMHO compilations shoulld be SILENT unless something is wrong.

Then I tried to install it with

$ sudo cmake --build . --config Release --target install

and gave up after the fourth attempt. Didn't seem to want to use the
user-installed version of cmake even after explicitly setting the PATH
and linking to the files in ~/.local/bin/ from /usr/local/bin/. So I
installed cmake system-wide, then

# cmake --build . --config Release --target install

and finally:

# freshclam
Creating missing database directory: /usr/local/share/clamav
Assigned ownership of database directory to user "clamav".
ClamAV update process started at Thu Nov 4 10:59:02 2021
daily database available for download (remote version: 26343)
...
Testing database: '/usr/local/share/clamav/tmp.d4d23352f9/clamav-1bce76...
Database test passed.
daily.cvd updated (version: 26342, sigs: 1941589, f-level: 90, builder: raynman)
Received an older daily CVD than was advertised. We'll retry so the incremental update will ensure we're up-to-date.
daily database available for update (local version: 26342, remote version: 26343)
Current database is 1 version behind.
Downloading database patch # 26343...
...
Testing database: '/usr/local/share/clamav/tmp.d4d23352f9/clamav-a85a10...
Database test passed.
daily.cld updated (version: 26343, sigs: 1941807, f-level: 90, builder: raynman)
main database available for download (remote version: 62)
...
Testing database: '/usr/local/share/clamav/tmp.d4d23352f9/clamav-428c412...
Database test passed.
main.cvd updated (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
bytecode database available for download (remote version: 333)
...
Testing database: '/usr/local/share/clamav/tmp.d4d23352f9/clamav-6e1b2d1...
Database test passed.
bytecode.cvd updated (version: 333, sigs: 92, f-level: 63, builder: awillia2)
8<----------------------------------------------------------------------

It seems a little strange that freshclam found this:

* daily database available for download (remote version: 26343)

but then did this:

* daily.cvd updated (version: 26342, sigs: 1941589, f-level: 90, builder: raynman)

smartly followed by this:

* daily database available for update (local version: 26342, remote version: 26343)

and this:

* Downloading database patch # 26343...

and this:

* daily.cld updated (version: 26343, sigs: 1941807, f-level: 90, builder: raynman)

but otherwise things seem to have worked so I'll let others worry
about that. The poor ol' Pi3B+ struggled a bit to test the database
because it's driven into swap, but it did eventually finish OK.

I didn't try to start clamd as there isn't nearly enough RAM on the
Pi3B+ and I didn't want to crash it.

So there you have it. Not exactly a breeze but a great deal less
trouble than working with a completely different architecture.

--

73,
Ged.

_______________________________________________

clamav-users mailing list
clamav-users@lists.clamav.net
https://lists.clamav.net/mailman/listinfo/clamav-users


Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq

http://www.clamav.net/contact.html#ml
Re: [clamav-users] Solaris users in a bind [ In reply to ]
We're still on Solaris 10 x86: what's the
latest supported version of ClamAV,
ideally a binary/ready-to-use copy
that I can get hold of?

The team will only move out of Solaris
10 in about two years' time.




>
Re: [clamav-users] Solaris users in a bind [ In reply to ]
All versions of ClamAV prior to 0.103 are essentially EOL at this point.
The only options for Solaris 10 are likely to build from source, along with
all the prerequisites.

--Maarten

On Sat, Nov 6, 2021 at 7:54 AM Sunhux G via clamav-users <
clamav-users@lists.clamav.net> wrote:

>
> We're still on Solaris 10 x86: what's the
> latest supported version of ClamAV,
> ideally a binary/ready-to-use copy
> that I can get hold of?
>
> The team will only move out of Solaris
> 10 in about two years' time.
>
>
>
>
>>
> _______________________________________________
>
> clamav-users mailing list
> clamav-users@lists.clamav.net
> https://lists.clamav.net/mailman/listinfo/clamav-users
>
>
> Help us build a comprehensive ClamAV guide:
> https://github.com/vrtadmin/clamav-faq
>
> http://www.clamav.net/contact.html#ml
>