Re: [Rpm-maint] [rpm-software-management/rpm] RFE: option for initial-only content in files (#152)
Add * update by patching and make the policies platform and machine specific. Then call the implementation something catchier than ansible or DevOps. Seriously: configuration != package management. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/152#issuecomment-293591026___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: option for initial-only content in files (#152)
Just to enumerate what sort of things an update policy would consist of, from the top of my head: - whether to install the file in the first place (default obviously yes, but %ghost does not get installed at all) - whether to replace files (default being yes, currently only changable with %config(noreplace)) - whether to backup overwritten files (default being no, %config enables) - whether file metadata should be updated (default yes, no for %ghost and some other arguably buggy cases, and then one might actually want metadata updates for %ghost files) ...and probably something else too, but that's what rpm currently implements in the typical ad-hoc manner. So here's a fine chance to make things less ad-hoc as well. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/152#issuecomment-293539537___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: option for initial-only content in files (#152)
Thinking about it some more... what we're actually talking about here is a file update policy. An update policy is a selection of operations such as whether to replace modied files or not, to backup or not etc. When looking at it from this perspective, it all starts making more sense: %config is merely a *name* for a particular selection of such operations, aka policy, not a feature in itself, and this new thing is not a parallel feature to %config, but another update policy which partially overlaps with %config. So implementation-wise, rpm internals need a bit of generalization (what a surprise) before proceeding. And of course it needs a name too, but for starters %updatepolicy(...) will do, better suggestions welcome. After that, %config can be made into an actual macro that emits a matching %updatepolicy, and maybe by that time we've come up with a couple of other policies common enough that they deserve a name in style of %config. %ghost related to this too, but its roots are deeper since the data is omitted from the payload entirely. As for the behavior the actual RFE, I suspect there are cases where a packager *really* wants just the initial content, never to be touched by rpm again. So that needs to be an option along the "update until modified" variant. I guess. Then there's the question of legacy compatibility, all this should be retrofitted in a manner that makes older rpm versions not implementing the new thing to do something relatively sane. Adding an rpmlib() dependency on this would be like killing a fly with a sledgehammer. -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/152#issuecomment-293532010___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: option for initial-only content in files (#152)
I try to sum up what I think that should be done with this issue. Name is unresolved. I chose "mutable" as an interim one. %mutable will be defined for REG files and LINKs. Behavior : - if a file/link is the same as in new package (it has the same contents, gid, uid and mode)/(is the same), then touch it (set time stamp for REG files). - if a file/link is the same as in old package (it has the same contents, gid, uid and mode)/(is the same), then upgrade it as "normal" file/link - else do nothing (It means, that for config files/links rpm will behave similarly as %config(noreplace), but without creation backup files and warnings. The only difference is that this behavior takes files with the same contents but different uid or gid or mode as different. For %config(noreplace) such files are similar. ) -- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/152#issuecomment-293501438___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: option for initial-only content in files (#152)
Hmm... Also makes me wonder if such a file should be updated IFF the on-disk file hasn't been altered since installation - consider a case where the initial content is somehow incorrect and a later package version corrects this. Another possible name for the thing, especially if it IS updated until locally modified, might be %mutable. These cases tend to be "variable data", aka the kind of stuff that goes into /var. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/152#issuecomment-278895515___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] RFE: option for initial-only content in files (#152)
Just yesterday, I had usecase for this. I am packaging updated Vagrant and there is used "plugin.json" file. We used to store it in ```%{_datadir}/vagrant/plugin.json``` and it used to be ghost file. But upstream changed some internals and now it is not possible to convince Vagrant to use the file at that location directly, but at the same time, the file needs to be modified when some vagrant- plugin package is installed. So I thought _"let the file in ```%{datadir}``` and provide a link to the place where Vagrant thinks the file should be"_. But now it cannot be ghost file anymore, otherwise this would be dangling link. On the other hand, it is not really configuration file, since nobody should modify it manually. For now, I am going with ```%config(noreplace)``` but ```%config(installonly)``` would be much better. Actually if it was ```%installonly``` without config, it would be much better. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/152#issuecomment-278885673___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint