Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 348961 - sys-apps/smartmontools-5.40 script update-smart-drivedb writes to /usr
Summary: sys-apps/smartmontools-5.40 script update-smart-drivedb writes to /usr
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-17 17:23 UTC by Marcin Mirosław
Modified: 2010-12-17 22:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Mirosław 2010-12-17 17:23:24 UTC
=======
# update-smart-drivedb --help
smartmontools 5.40 drive database update script

Usage: /usr/sbin/update-smart-drivedb [-v] [DESTFILE]

  -v    verbose output

Updates /usr/share/smartmontools/drivedb.h
or DESTFILE from smartmontools SVN repository.
Tries to download first from branch RELEASE_5_40_DRIVEDB
and then from trunk.
=======

Smart{d,ctl} use database placed in dir /usr/share/smartmontools/ , it's ok.
IMHO problem appears when we run script update-smart-drivedb. First, /usr is often mounted with RO, second thought, databases, which can by automatically updated are placed (usually in gentoo) in /var/lib (for example: clamav, spamassassin).
FHS states:
/usr/ -	Secondary hierarchy for read-only user data; contains the majority of (multi-)user utilities and applications.
/var/lib/ - State information. Persistent data modified by programs as they run, e.g., databases, packaging system metadata, etc.

The same problem is with pciutils and usbutils. They keep database in /usr/share/misc

Reproducible: Always
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-17 17:51:05 UTC
You will probably be asked to take this issue upstream.
Comment 2 SpanKY gentoo-dev 2010-12-17 18:06:17 UTC
other packages do this as well.  like pciutils and pci.ids usbutils and usb.ids.  if you dont like this behavior, dont update your db.
Comment 3 Marcin Mirosław 2010-12-17 22:38:48 UTC
I didn't say pciutils and usbuitls keep database in correct place. But with them it's another problem: hal is using their files. But mayby this can be configured in hal ./configure script.
But changing location in smartmontools isn't very hard. Upstream did it, we have got:
./configure --help
[...]
--with-drivedbdir=DIR   Location of drive database file (implies
                          --enable-drivedb) [DATADIR/smartmontools]

No patch is needed.