Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have default driver path as default in specification #6

Open
markus2330 opened this issue Mar 10, 2019 · 9 comments
Open

have default driver path as default in specification #6

markus2330 opened this issue Mar 10, 2019 · 9 comments

Comments

@markus2330
Copy link

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).

@kodebach
Copy link
Member

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.

@markus2330
Copy link
Author

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.

@markus2330
Copy link
Author

@Piankero what is the status here?

@kodebach
Copy link
Member

kodebach commented Oct 7, 2019

The post-install script takes care of this:

run_mount_script LCDd && kdb set "/sw/lcdproc/lcdd/#0/current/server/driverpath" "$INSTALL_PREFIX/lib/lcdproc/"

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

@markus2330
Copy link
Author

Any specific reason why the post-install script does not directly modify the "default" value of the specification?

@kodebach
Copy link
Member

kodebach commented Oct 7, 2019

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.

@markus2330
Copy link
Author

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.

@kodebach
Copy link
Member

kodebach commented Oct 7, 2019

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.

@ghost
Copy link

ghost commented Oct 8, 2019

Ok, let's change the post-install.sh script.

Do you change that @kodebach ? Or is there something else to change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants