Re: [clamav-users] Compiling and installing from an NFS mount

2012-03-13 Thread G.W. Haywood

Hi there,

On Tue, 13 Mar 2012, Forrest Aldrich wrote:


I've run into a quirky issue with installing ClamAV from an NFS mount.


It's what you're doing that's quirky. :)


I do this to keep the same code available to all my systems.  I have
separate mounts for 32- and 64-bit.


For something like ClamAV, I don't see the point.  You seem to be
making it harder for yourself than it needs to be.


For ClamAV, the installation will fail because the NFS mount itself is
read-only (ro):


As Mr. Swiger said, that's expected.


... I wonder if there's a clever way around this.   I really don't want
to go through and change the mounts to read-write -- they are read-only
for a reason -- or copy the code over and install each individually.


As I said, I think you're making this harder than it needs to be.  You
do know that after make install you can delete the entire source tree
if you don't want to keep it?  What's wrong with a small shell script?

#!/bin/bash
cd /tmp
tar xzvf /nfs_mount/clamav-x.xx.tgz
cd clamav-x.xx
./configure --with-various-options
make
sudo make install
cd ..
rm -rf clamav-x.xx

--

73,
Ged.
___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


Re: [clamav-users] Compiling and installing from an NFS mount

2012-03-13 Thread Pierre Dehaen
Hmm, my script is a bit more complex as it:
- unzip  untar
- configure
- make  make check
- backs up the current clamav directory (who knows...)
- backs up the configuration files
- disable the clamav service (I'm running on Solaris)
- make uninstall (from the previous build directory)
- make install
- mkdir, chown, chmod the service method and manifest subdirectories under the 
prefix 
directory (which is /opt/clamav here)
- touches /opt/clamav/etc/clamd if needed
- copies the manifest if needed
- imports the manifest to create the service if needed
- compares the old revision freshclam.conf.orig and freshclam.conf to reapply 
(patch) the 
same changes to the current freshclam.conf
- does the same for clamd.conf
- checks if my own signatures have not disappeared
- enables the service and checks if it starts smoothly.

It's maybe overkill here and there but, for instance, I don't want to 
reconfigure manually 
clamav and freshclam from the default files, and I don't want to keep the old 
configuration 
files that may miss new settings. If you have any advise, please share !

Thank you
Regards,
Pierre

On 13 Mar 2012 at 11:47, G.W. Haywood wrote:

 [...]
  What's wrong with a small shell script?
 
 #!/bin/bash
 cd /tmp
 tar xzvf /nfs_mount/clamav-x.xx.tgz
 cd clamav-x.xx
 ./configure --with-various-options
 make
 sudo make install
 cd ..
 rm -rf clamav-x.xx
 
 --
 
 73,
 Ged.
 ___
 Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
 http://www.clamav.net/support/ml
 
 



___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


Re: [clamav-users] Compiling and installing from an NFS mount

2012-03-13 Thread Shawn Bakhtiar


As in administrator I would be very afraid to automate the installation or 
updating of any software.

Are you doing many machines? If so, and they all use the same OS, why not build 
on one, and just distribute the build to all the others?

Just sharing :)


 From: deha...@drever.be
 To: clamav-users@lists.clamav.net
 Date: Tue, 13 Mar 2012 15:32:40 +0100
 Subject: Re: [clamav-users] Compiling and installing from an NFS mount
 
 Hmm, my script is a bit more complex as it:
 - unzip  untar
 - configure
 - make  make check
 - backs up the current clamav directory (who knows...)
 - backs up the configuration files
 - disable the clamav service (I'm running on Solaris)
 - make uninstall (from the previous build directory)
 - make install
 - mkdir, chown, chmod the service method and manifest subdirectories under 
 the prefix 
 directory (which is /opt/clamav here)
 - touches /opt/clamav/etc/clamd if needed
 - copies the manifest if needed
 - imports the manifest to create the service if needed
 - compares the old revision freshclam.conf.orig and freshclam.conf to reapply 
 (patch) the 
 same changes to the current freshclam.conf
 - does the same for clamd.conf
 - checks if my own signatures have not disappeared
 - enables the service and checks if it starts smoothly.
 
 It's maybe overkill here and there but, for instance, I don't want to 
 reconfigure manually 
 clamav and freshclam from the default files, and I don't want to keep the old 
 configuration 
 files that may miss new settings. If you have any advise, please share !
 
 Thank you
 Regards,
 Pierre
 
 On 13 Mar 2012 at 11:47, G.W. Haywood wrote:
 
  [...]
   What's wrong with a small shell script?
  
  #!/bin/bash
  cd /tmp
  tar xzvf /nfs_mount/clamav-x.xx.tgz
  cd clamav-x.xx
  ./configure --with-various-options
  make
  sudo make install
  cd ..
  rm -rf clamav-x.xx
  
  --
  
  73,
  Ged.
  ___
  Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
  http://www.clamav.net/support/ml
  
  
 
 
 
 ___
 Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
 http://www.clamav.net/support/ml
  
___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


Re: [clamav-users] Compiling and installing from an NFS mount

2012-03-13 Thread Pierre Dehaen
No, I just install on a few mail filtering machines, all Solaris... and the 
script is not automated: 
it asks for confirmation before doing each step and it shows output of 
commands, so you can 
stop the script, verify, fix, etc, and restart, skip some steps already done, 
and complete the 
update. And ss this is something I have to do every few months only, it helps 
to remember 
the exact procedure.

Build on one, distribute to others can be risky if they are not at the same 
revision of the 
packages.

Pierre

On 13 Mar 2012 at 12:08, Shawn Bakhtiar wrote:

 
 
 As in administrator I would be very afraid to automate the installation or 
 updating of any software.
 
 Are you doing many machines? If so, and they all use the same OS, why not 
 build on one, and just distribute the build to all the others?
 
 Just sharing :)
 
 
  From: deha...@drever.be
  To: clamav-users@lists.clamav.net
  Date: Tue, 13 Mar 2012 15:32:40 +0100
  Subject: Re: [clamav-users] Compiling and installing from an NFS mount
  
  Hmm, my script is a bit more complex as it:
  - unzip  untar
  - configure
  - make  make check
  - backs up the current clamav directory (who knows...)
  - backs up the configuration files
  - disable the clamav service (I'm running on Solaris)
  - make uninstall (from the previous build directory)
  - make install
  - mkdir, chown, chmod the service method and manifest subdirectories under 
  the prefix 
  directory (which is /opt/clamav here)
  - touches /opt/clamav/etc/clamd if needed
  - copies the manifest if needed
  - imports the manifest to create the service if needed
  - compares the old revision freshclam.conf.orig and freshclam.conf to 
  reapply (patch) the 
  same changes to the current freshclam.conf
  - does the same for clamd.conf
  - checks if my own signatures have not disappeared
  - enables the service and checks if it starts smoothly.
  
  It's maybe overkill here and there but, for instance, I don't want to 
  reconfigure manually 
  clamav and freshclam from the default files, and I don't want to keep the 
  old configuration 
  files that may miss new settings. If you have any advise, please share !
  
  Thank you
  Regards,
  Pierre
  
  On 13 Mar 2012 at 11:47, G.W. Haywood wrote:
  
   [...]
What's wrong with a small shell script?
   
   #!/bin/bash
   cd /tmp
   tar xzvf /nfs_mount/clamav-x.xx.tgz
   cd clamav-x.xx
   ./configure --with-various-options
   make
   sudo make install
   cd ..
   rm -rf clamav-x.xx
   
   --
   
   73,
   Ged.
   ___
   Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
   http://www.clamav.net/support/ml
   
   
  
  
  
  ___
  Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
  http://www.clamav.net/support/ml
 
 ___
 Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
 http://www.clamav.net/support/ml
 
 



___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


Re: [clamav-users] Compiling and installing from an NFS mount

2012-03-13 Thread Forrest Aldrich

[ .. ]



I do this to keep the same code available to all my systems. I have
separate mounts for 32- and 64-bit.


For something like ClamAV, I don't see the point. You seem to be
making it harder for yourself than it needs to be.
This is a matter of opinion :-) My goal is to have the code all NFS 
mounted, but at the moment our internal rollout process is localized.


What's happening is the clamav installation (make install) creates a 
file *.tmp and removes it. This is why the process failed because I 
mount the directory read-only on most of the systems to prevent 
corruption. This is easily resolved by simply using another NFS mount 
from where I keep distribution src.



For ClamAV, the installation will fail because the NFS mount itself is
read-only (ro):


As Mr. Swiger said, that's expected.
I know that. I just asked if there was a way around it, and I see my 
solution will work (separate mount).



... I wonder if there's a clever way around this. I really don't want
to go through and change the mounts to read-write -- they are read-only
for a reason -- or copy the code over and install each individually.


As I said, I think you're making this harder than it needs to be. You
do know that after make install you can delete the entire source tree
if you don't want to keep it? What's wrong with a small shell script?

I think you misunderstand. I'm keeping the source tree -- one build for 
32-bit, the other for 64-bit. It would otherwise make no sense to bring 
the code to each system and build repeatedly :-)


ClamAV has very little overhead that I can tell, but what I'm concerned 
about with NFS is if these systems utilize an NFS mount, then the daily 
signature updates will need to be moved off; at the moment they are 
defaulting to:


/usr/local/share/clamav
/usr/local/share/clamav/mirrors.dat
/usr/local/share/clamav/bytecode.cld
/usr/local/share/clamav/daily.cld
/usr/local/share/clamav/main.cld

I can set this in the freshclam.conf file to /var/lib/clamav - but it's 
another directory to worry about locally which I can address with Puppet.





Thanks.

___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


Re: [clamav-users] Compiling and installing from an NFS mount

2012-03-13 Thread Forrest Aldrich



On 3/13/12 1:02 PM, Pierre Dehaen wrote:

No, I just install on a few mail filtering machines, all Solaris... and the 
script is not automated:
it asks for confirmation before doing each step and it shows output of 
commands, so you can
stop the script, verify, fix, etc, and restart, skip some steps already done, 
and complete the
update. And ss this is something I have to do every few months only, it helps 
to remember
the exact procedure.

Build on one, distribute to others can be risky if they are not at the same 
revision of the
packages.

Pierre

On 13 Mar 2012 at 12:08, Shawn Bakhtiar wrote:


As in administrator I would be very afraid to automate the installation or 
updating of any software.

Are you doing many machines? If so, and they all use the same OS, why not build 
on one, and just distribute the build to all the others?

Just sharing :)


In our case, it's all the same revision/OS (RHEL 5.x) -- we have both 
32- and 64-bit to contend with, therefore 2 separate builds and NFS 
exports. The ideal case being to import that directory tree and use that 
in production instead of having to roll out to each system (we do perl 
and other finicky builds).



___
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml