Where do we put models if we take into account the FHS?

Given the latest FHS, I think models should go at: /usr/local/share/models.

They do should not be at /var because they’re not variable. They’re, pretty much, static.

Any proposals or ideas on the matter?

Maybe /srv?

Could be. AFAIK, /srv should hold data for actual services provided by the host. Anyone can think of a reason not to put models there?

I guess a reason not to put data under /srv would be if you explicitly don’t want it to be remotely accessible (e.g. it might be easy for some sort of misconfiguration to “leak” the contents of /srv). You wouldn’t want to store a database that might contain sensitive information or configuration files there, for example.

It looks like /srv has the advantage of having the same SELinux context as /var (var_t). At least for most paths:

$ grep '^/srv' /etc/selinux/targeted/contexts/files/file_contexts
/srv/.*	system_u:object_r:var_t:s0
/srv/([^/]*/)?ftp(/.*)?	system_u:object_r:public_content_t:s0
/srv/([^/]*/)?www(/.*)?	system_u:object_r:httpd_sys_content_t:s0
/srv/([^/]*/)?rsync(/.*)?	system_u:object_r:public_content_t:s0
/srv/([^/]*/)?www/logs(/.*)?	system_u:object_r:httpd_log_t:s0
/srv/node(/.*)?	system_u:object_r:swift_data_t:s0
/srv/gallery2(/.*)?	system_u:object_r:httpd_sys_content_t:s0
/srv/containers(/.*)?	system_u:object_r:container_file_t:s0
/srv/lib/gitosis(/.*)?	system_u:object_r:gitosis_var_lib_t:s0
/srv/gallery2/smarty(/.*)?	system_u:object_r:httpd_sys_rw_content_t:s0
/srv/loopback-device(/.*)?	system_u:object_r:swift_data_t:s0
/srv	system_u:object_r:var_t:s0

/usr/local/share is usr_t:

$ ls -Zd /usr/local/share
system_u:object_r:usr_t:s0 /usr/local/share

Just my 2¢, but I would lean towards putting the data under /srv because /usr/local is for third-party content.

Excerpted from wikipedia.org – FHS:

Most of the time /usr/local is used for installing software/data that are not part of the standard operating system distribution (in such case, /usr would only contain software/data that are part of the standard operating system distribution). It is possible that the FHS standard may in the future be changed to reflect this de facto convention.

Well, a model is exactly that; 3rd-party content. One would download a model from anywhere but the Fedora repos.

Models aren’t variable data. They are pretty much static. They’re not exactly databases either.

Models should be accessed only by;

  • Services that consume them.
  • LiLibraries that will load them and make them useful.
  • Scripts of some kind.

They are also huge so we need to figure out where to put them because of storage constraints.

Again, this is just my opinion as a user, but if there is reason that I might want or need to mount additional storage for this data (e.g. because it is large or perhaps because I want it stored on something with higher bandwidth or seek times), then I would prefer that the path is something “shallow” like /srv/models or /opt/models. I’d rather not have something that takes significant space or resources buried/hidden 4 or 5 levels deep in the filesystem. If it is strictly third-party content, a directory under /opt might make sense.

A valid opinion non the less.