I just learn about: https://fedoraproject.org/wiki/PackagingDrafts/Logfiles So the proposal (and some packages are already using this) is to mark log files beside %ghost flag additionaly with %config as well. This is clearly misuse of %config, because log files are not configs. The case which the proposal is trying to solve is: "to not remove log files, when package is removed." I belive that new attribute: %ghost(noremove) with the semantic: "This file is marked as %ghost, but during removal of the package, the files is not removed." can solve the problem.
%config %ghost has exactly the semantics needed in every ancient rpm version out there, inventing a new incompatible flag (whether as a syntactic sugar for %config or actual pkg level flag) "just because" doesn't seem particularly useful to me. I can promise you rpm wont mind packagers lying about the log file contents ;)
> I can promise you rpm wont mind packagers lying about the log file contents. But I (as author rpmconf) mind about that. If you ask rpm what *config* files mysql have, you will get: # rpm -qc mariadb-server /etc/logrotate.d/mariadb /etc/my.cnf.d/server.cnf /etc/my.cnf.d/tokudb.cnf /var/log/mariadb/mariadb.log /var/log/mysqld.log And users need to solve rpmnew/rpmsave differences on log files, which is nonsense. Of course I can code some heuristic, but that would not be systematic approach.
I will also add one more thing. There is a proposal floating around to automatically extract config files into subpackages. While nothing has been decided about it, if packages misuse %config to mark log files as well, it will block one of the possible solutions how to detect the config files. At this point I'm not inclined to any side, I just want this to be taken into account (maybe there is a way how to detect the config files other than detecting the %config flag?)
(In reply to Miroslav Suchý from comment #2) > > I can promise you rpm wont mind packagers lying about the log > file contents. > > But I (as author rpmconf) mind about that. If you ask rpm what *config* > files mysql have, you will get: > # rpm -qc mariadb-server > /etc/logrotate.d/mariadb > /etc/my.cnf.d/server.cnf > /etc/my.cnf.d/tokudb.cnf > /var/log/mariadb/mariadb.log > /var/log/mysqld.log > > And users need to solve rpmnew/rpmsave differences on log files, which is > nonsense. Of course I can code some heuristic, but that would not be > systematic approach. Well you need to make rpmconf aware of %ghosts anyway because its what existing packages rely on. There's no need for heuristics as %ghost %config file is truly ignored always, no .rpmnew/.rpmsave etc files are ever created, and unlike other ghosts they're not removed either. Sure I too would prefer if all %ghost, %config etc were defined in terms of what they actually do instead of these magic incantations to get desired behavior, but it is what it is. So all I can say is "maybe someday", its not that the idea is bad its just not exactly on the top of priorities.
> no .rpmnew/.rpmsave etc files are ever created Well I have /var/log/mysqld.log.rpmnew as symlink to /var/log/mariadb/mariadb.log on my disk. This is how I got to this topic. > not exactly on the top of priorities *nod*
(In reply to Miroslav Suchý from comment #5) > > no .rpmnew/.rpmsave etc files are ever created > > Well I have /var/log/mysqld.log.rpmnew as symlink to > /var/log/mariadb/mariadb.log on my disk. This is how I got to this topic. It hasn't always been a %ghost, in fact its only been marked as such fairly recently: commit 9aff247e120300d67cb66f8c35be9c7eb919a125 Author: Honza Horák <hhorak> Date: Mon Jan 6 18:09:21 2014 +0100 Use %%ghost directive for the log file Related: 1043501 %ghost %config as such will never create .rpmnew/.rpmsave/.rpmorig files.
I don't see any new flags necessary nor happening. Closing.
/me is very sad about this resolution. :(