Mailing List Archive

[clamav-users] Difference between datadir and datarootdir
Hi

Been compiling clamav for a while ... I always set the "DatabaseDirectory" in clamd.conf, but

./configure --help states:

--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]

This is really confusing as datadir points DATAROOTDIR.

Can I make them the same?


Anybody has some insides into this?
Please!


Jobst



--
Nice computers don't go down.

| |0| | Jobst Schmalenbach, General Manager
| | |0| Barrett & Sales Essentials
|0|0|0| +61 3 9533 0000, POBox 277, Caulfield South, 3162, Australia

_______________________________________________

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] Difference between datadir and datarootdir [ In reply to ]
On 3/4/19 9:28 PM, Jobst Schmalenbach via clamav-users wrote:
>
> This is really confusing as datadir points DATAROOTDIR.
>
> Can I make them the same?
>

It's confusing in clamav because it's confusing everywhere. Those
directories and their meanings' come from autotools:

https://www.gnu.org/prep/standards/html_node/Directory-Variables.html

but you shouldn't expect to be enlightened after reading that page.
Probably the best way to understand it is with an example. First, many
of the other directories (datadir, mandir, infodir,...) are defined in
terms of datarootdir. So, for example, we might have

* DATADIR=$(DATAROOTDIR),
* MANDIR=$(DATAROOTDIR)/man, and
* INFODIR=$(DATAROOTDIR)/info

That means that if you want to move *all of that stuff*, then you would
move the datarootdir.

But then what is datadir for? Well... historically, some people have
wanted to treat e.g. games as second-class packages. So, for example,
they wanted to put all of the graphics files for games under
/usr/share/games/<package-name>. That's fine, if the games themselves
know where to look for that stuff. But things like man/info pages can't
go there -- they need to be in the place where "man" or "info" will look
for them! And basically, you can set DATADIR=/usr/share/games to
accomplish that sort of thing.

So to summarize: yes, you can set them the same, and they will usually
be the same.

_______________________________________________

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] Difference between datadir and datarootdir [ In reply to ]
On Wed, Mar 06, 2019 at 10:11:21PM -0500, Michael Orlitzky via clamav-users (clamav-users@lists.clamav.net) wrote:
> On 3/4/19 9:28 PM, Jobst Schmalenbach via clamav-users wrote:
> >
> > This is really confusing as datadir points DATAROOTDIR.
> > Can I make them the same?
>
> It's confusing in clamav because it's confusing everywhere. Those
> directories and their meanings' come from autotools:

[snip]

> So to summarize: yes, you can set them the same, and they will usually
> be the same.

Good, thanks!
Jobst


--
There are 10 kinds of people in the world, those who understand binary and those who don't.

| |0| | Jobst Schmalenbach, General Manager
| | |0| Barrett & Sales Essentials
|0|0|0| +61 3 9533 0000, POBox 277, Caulfield South, 3162, Australia

_______________________________________________

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