mchehab/rasdaemon

sudo rasdaemon -f -r fails on Ubuntu, because /usr/local/var/lib/rasdaemon does not exist

TiborGY opened this issue · 1 comments

Rasdaemon tries to make a directory in a folder that does not exist on Ubuntu 20.04

overriding event (1400) ras:mc_event with new print handler
rasdaemon: ras:mc_event event enabled
rasdaemon: Enabled event ras:mc_event
overriding event (1397) ras:aer_event with new print handler
rasdaemon: ras:aer_event event enabled
rasdaemon: Enabled event ras:aer_event
overriding event (111) mce:mce_record with new print handler
rasdaemon: mce:mce_record event enabled
rasdaemon: Enabled event mce:mce_record
rasdaemon: Listening to events for cpus 0 to 23
Calling ras_mc_event_opendb()
rasdaemon: Failed to create state directory /usr/local/var/lib/rasdaemon

This is how /usr/local looks like:

$ ll /usr/local/
total 40
drwxr-xr-x 10 root root 4096 febr   4  2021 ./
drwxr-xr-x 14 root root 4096 febr   4  2021 ../
drwxr-xr-x  2 root root 4096 febr   4  2021 bin/
drwxr-xr-x  2 root root 4096 febr   4  2021 etc/
drwxr-xr-x  2 root root 4096 febr   4  2021 games/
drwxr-xr-x  2 root root 4096 febr  12 16:52 include/
drwxr-xr-x  4 root root 4096 júl   30  2021 lib/
lrwxrwxrwx  1 root root    9 febr   4  2021 man -> share/man/
drwxr-xr-x  2 root root 4096 febr  12 16:52 sbin/
drwxr-xr-x  6 root root 4096 jan   17 04:11 share/
drwxr-xr-x  2 root root 4096 febr   4  2021 src/

Rasdaemon should detect this and either mkdir the required path during make install, or use something that is available.

There are a number of configuration options offered by ./configure. They allow adjusting distro-specific directories:

./configure --help
...
Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root [DATAROOTDIR/doc/rasdaemon]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]
...
Optional Packages:
...
  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
                          compiler's sysroot if not specified).
  --with-sysconfdefdir=DIR
                          rasdaemon environment file dir