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

Use better defaults for installation directories #574

Merged
merged 2 commits into from
Aug 4, 2021

Conversation

bjoernricks
Copy link
Contributor

@bjoernricks bjoernricks commented Aug 4, 2021

What:

Changed defaults for installation locations

  • SYSCONFDIR is /etc by default now
  • LOCALSTATEDIR is /var by default now
  • Introduced GVM_RUN_DIR that uses /run/gvm by default
  • GVM_PID_DIR is /run/gvm by default now

Why:

Use same defaults in every component and use defaults that make sense on a normal system.

How:

Checklist:

Changed defaults for installation locations

* SYSCONFDIR is /etc by default now
* LOCALSTATEDIR is /var by default now
* Introduced GVM_RUN_DIR that uses /run/gvm by default
* GVM_PID_DIR is /run/gvm  by default now
@bjoernricks bjoernricks requested a review from a team as a code owner August 4, 2021 14:26
@bjoernricks bjoernricks added backport-to-stable This pull request will be backported to the 21.04 branch backport-to-main This pull request will be ported to the master branch labels Aug 4, 2021
@bjoernricks bjoernricks enabled auto-merge August 4, 2021 14:29
@bjoernricks bjoernricks merged commit 83b88f7 into gvm-libs-20.08 Aug 4, 2021
@bjoernricks bjoernricks deleted the bricks/adjust-default-paths branch August 4, 2021 14:35
y0urself added a commit that referenced this pull request Aug 4, 2021
Use better defaults for installation directories (backport #574)
y0urself added a commit that referenced this pull request Aug 4, 2021
Use better defaults for installation directories (backport #574)
@wisukind
Copy link

wisukind commented Aug 9, 2021

Seems like this patch broke useage of GVM_INSTALL_PREFIX variable. Whatever you put in that variable, this is now completely ignored by cmake at compile time, and the new defaults are systematically used.

@bjoernricks
Copy link
Contributor Author

That's not correct. We just follow another scheme. CMAKE_INSTALL_PREFIX is still used for the application data (the files that are normally installed somewhere into /usr). state or config data is installed into root directories by default for example into /etc, /var or /run because it doesn't really make sense to install them into a different location by default.

The aim of the new install locations is to provide and easy system wide installation by default.

@bjoernricks
Copy link
Contributor Author

If you don't use a system wide installation you need to adjust the cmake parameters listed above in the PR description.

@wisukind
Copy link

wisukind commented Aug 9, 2021

I understand the logic but why ignoring GVM_INSTALL_PREFIX ? Wouldn't it be more simple to provide those defaults in case GVM_INSTALL_PREFIX is unset, which would apply to most users not wanting a particular root installation path by default without breaking those who wants ? Now you're forcing users to use this new default, unless they change every single state or config data manually.

@bjoernricks
Copy link
Contributor Author

Just to be clear there is no GVM_INSTALL_PREFIX it is CMAKE_INSTALL_PREFIX. CMAKE_INSTALL_PREFIX is never empty. It's default is /usr/local. Therefore there is no possibility to check if it is set or not.

@wisukind
Copy link

wisukind commented Aug 9, 2021

Yes, typo erro. I meant CMAKE_INSTALL_PREFIX

@LZD-TMoreggia
Copy link

LZD-TMoreggia commented Dec 29, 2021

So if we used CMAKE_INSTALL_PREFIX before and we want to keep using same structure, now we need to manually set

  • SYSCONFDIR to ${CMAKE_INSTALL_PREFIX}/etc
  • LOCALSTATEDIR to ${CMAKE_INSTALL_PREFIX}/var
  • GVM_RUN_DIR to ${LOCALSTATEDIR}/run
  • GVM_PID_DIR to ${LOCALSTATEDIR}/run

is that correct?

@ArnoStiefvater
Copy link
Member

There is no GVM_PID_DIR in gvm-libs anymore.

And I have GVM_RUN_DIR set to <install_prefix>/run/gvm as the new default is run/gvm. Everything else seems to be correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-main This pull request will be ported to the master branch backport-to-stable This pull request will be backported to the 21.04 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants