-
Notifications
You must be signed in to change notification settings - Fork 56
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
Pre-decommission of /etc/recap in favor of /etc/recap.conf. #137
Conversation
👍 - I very much like this change because |
@troyengel This doesn't have anything to do with @tonyskapunk The only problem I see with a check for the old location |
@carlwgeorge - you may have missed it in the diff, I was referring to the code where we are, in fact, removing the On the .rpmsave -- won't this happen only if the configuration file has not been edited by the end user? (matches the hash from the RPM) I'm not too familiar with the semantics when the name changes and it's been edited though at the same time. If we build in a check for .rpmsave (or maybe ,rpmnew?), should we also add the same check for whatever DEB packages do in the same conceptual ballpark? Cover all our bases? If we have %config(noreplace) I think (if I read the chart correctly for our situation) if the user has edited the file the new one will become recap.conf.rpmnew? (http://pkgs.fedoraproject.org/cgit/rpms/recap.git/tree/recap.spec#n50) (Edit: thinking on it, I guess the problem is RPM sees these two files as unique items, and doesn't understand they're the same file just being renamed. Hrmmm....) |
Ah I see the older check now, that's what I get for skimming. Your edit hits the nail on the head, they are two separate files. Your point about DEB semantics is noted, and actually changes my mind about having recap do any package-specific things. What about having the RPM own both files? Brainstorm: https://gist.github.com/carlwgeorge/eed7aaeadc4f30e729af33416be24170 |
I want to avoid doing something distro specific in the code, hence reading The purpose of this PR is:
Now back to the package discussion.
I think tracking just one file is less effort and has almost the same result. Thoughts? [0] Configuration files exist at old(/etc/recap) and new(/etc/recap.conf) locations. The file from the old location will be read.
Please move your configuration to /etc/recap.conf. [1] Configuration file exists at old(/etc/recap) location. The file will be read.
Please move your configuration file to /etc/recap.conf. [2] No configuration file found. Expecting /etc/recap.conf
Proceeding with defaults. |
Allow me to clarify what will happen if we simply do this in the spec file: -%config(noreplace) %{_sysconfdir}/recap
+%config(noreplace) %{_sysconfdir}/recap.conf unedited config
edited config
I'd like to avoid that last scenario to best comply with EPEL updates policy. |
Understood, then the best approach initially is to keep track of them both. Now, for future releases how it is handled to get rid of the old I want to know if there is anything the code should take into consideration but at the same time I want to avoid being too distro specific as reading
|
Oh, just realized that forgot to tag @carlwgeorge in my previous comment, any thoughts on the path of deprecation? If all looks good I'll go ahead and merge. Thanks! |
I agree about avoiding reading |
Hi @carlwgeorge sorry for the pressure with this one, since I'm looking into releasing 1.3.0 next week I'll like to know how are we feeling about this change and if I should delay it one more release to give you more time solving the packaging situation. Thanks! |
Rebased to include the now support of logging in |
After tinkering with this a bit, I think our best option is to implement the rpmsave file handling via a
Here is what would happen during the transaction:
The actual recap script can handle the transition however you like, I'll just add that to the spec file as soon as reading |
👍 - I like it. Is there any concern if - somehow, not sure how - an existing Edit: in this edge case, wouldn't that cause an RPM to stall if it asks "are you sure?"? Perhaps we need |
👍 No different than if subsequent package updates had new config files. For example if Good point on the force flag, I'll make sure to use that in the actual spec file. |
To
Subsequent releases will behave exactly the same, leaving the edited config file in It will be up to the user to ensure they switch to the latest configuration. |
Merging this one into |
These changes should slowly(through one release) warn about the lack of the new location of the config:
/etc/recap.conf
In case that's missing the old location is read
/etc/recap
, the old location has precedence over the new location for at least one release.Fix #80