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

Config file location #80

Closed
tonyskapunk opened this issue Feb 22, 2017 · 7 comments
Closed

Config file location #80

tonyskapunk opened this issue Feb 22, 2017 · 7 comments
Milestone

Comments

@tonyskapunk
Copy link
Contributor

Based on the discussion on #79 revisit the location for the configuration file, currently in /etc/recap the discussion in that PR suggests that it might be better to have it under /etc/recap.conf we can discuss the pros, cons in this issue rather that on the PR.

@troyengel
Copy link

One option: the package post-install could try and track if it's upgrading and rename the config file for us? I'm unsure what the DEB vs. RPM difference in capabilities are here, just adding as a possible idea pile.

@carlwgeorge
Copy link
Contributor

Two things can happen during the upgrade if we change %{_sysconfdir}/recap to %{_sysconfdir}/recap.conf in the spec file.

  1. If the file is unmodified, /etc/recap is removed and /etc/recap.conf is created. Effectively a simple move.
  2. If the file has been modified, /etc/recap is renamed to /etc/recap.rpmsave and /etc/recap.conf is created. Requires manual merging of those two files (similar to a normal .rpmnew file).

While we are able to add logic to %post to attempt to do more, it is non-standard and I would recommend we avoid it. Keep it simple.

@tonyskapunk
Copy link
Contributor Author

There are references to load configs from multiple locations, quite likely that needs to be removed as well:

@tonyskapunk
Copy link
Contributor Author

Alright, I've created #137 that should now give hints that the new location should be /etc/recap.conf to avoid the sudden change I'm still taking precedence to the old config in case is found: /etc/recap but on the next release that will be dropped.

@tonyskapunk
Copy link
Contributor Author

The first stage has been fixed - #137 (comment)

It is expected that /etc/recap references will be completely out of recap by 1.5.0

Changing milestone to 1.4.0 for the 2nd stage.

@tonyskapunk
Copy link
Contributor Author

#151 is a PR to be included in 1.4.0 This is continuation of the solution of this issue.

From: #137 (comment)

  • 1.4.0:
    • Create awareness of /etc/recap but now make /etc/recap.conf to take precedence.
    • If /etc/recap.conf is missing but /etc/recap is found the latter is read.

Package-wise(RPM) it will not be any major change as described in #137 (comment)

@tonyskapunk
Copy link
Contributor Author

Closing this issue, releasing in 2.0.0, Fix on #182

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

No branches or pull requests

3 participants