Open markus2330 opened 5 years ago
The drivers are installed into automake's $pkgdlibdir
, so ideally we would set the default to that at compile time. If that isn't possible, the default should be /usr/local/lib/lcdproc/
, which is the default for $pkglibdir
.
I pushed a commit to the low-level branch, that enables this behaviour. For the specification itself, it might be a bit more complicated to do this.
Thank you for the improvement!
Having it in the specification would have the advantage that people can introspect it, and we could check if the (default) folder exists on the system. I keep the issue open for that.
@Piankero what is the status here?
The post-install script takes care of this:
Running without installing may require manual setup. ~If a specification is already mounted (and compatible with the version of LCDproc you are trying to run), it should work without additional setup.~ see below
Any specific reason why the post-install script does not directly modify the "default" value of the specification?
Modifying the default value might be good idea, you are right. The current post-install
would only work for the current user I think.
Another solution would be to either change the install paths of LCDd
/the drivers or how the repository is set up (it would easier for a separate build directory). If the relative path from LCDd
to the driver directory, is the same in installed an non-installed LCDproc, then we could use something like $ORIGIN/relative/driver/path
. I don't know whether that works on every system, but it works with glibc.
If a specification is already mounted (and compatible with the version of LCDproc you are trying to run), it should work without additional setup.
That is actually not quite true... The driver path will be set to something like /usr/local/lib/lcdproc
, so without installing again, or changing the driver path, changes to drivers won't take effect.
The current post-install would only work for the current user I think.
It is executed as root, so the namespace "system" should be default.
That is actually not quite true... The driver path will be set to something like /usr/local/lib/lcdproc, so without installing again, or changing the driver path, changes to drivers won't take effect.
It is okay if the specification is bound to the installation, the specification will be removed during uninstall. But the system configuration usually survives an uninstall. This problem would be solved when we set the default instead of changing the (system) configuration.
It is executed as root, so the namespace "system" should be default.
Oh yeah, that would work... Running as non-root works as well, so it doesn't have to be executed as root though.
This problem would be solved when we set the default instead of changing the (system) configuration.
Ok, let's change the post-install.sh
script.
Ok, let's change the post-install.sh script.
Do you change that @kodebach ? Or is there something else to change?
The INSTALL.md currently says to do:
kdb set '/sw/lcdproc/lcdd/#0/current/server/driverpath' /usr/local/lib/lcdproc/
I think the compiled-in path should be default in the specification, making the kdb set only necessary if another path is to be used (or lcdproc is not yet installed).