Salut Vincent, Le samedi 28 février 2009, Vincent Untz a écrit :
Hey,
I was wondering... Right now, we do something like: %doc README AUTHORS ChangeLog NEWS in all packages.
However, we certainly forget about some of those files and we also include empty files there (by accident).
Would a macro that helps with this be a good idea? It could work like this:
in %install %find_package_doc cat %{name}.package_doc >> %{name}.lst
and then %files: %files -f %{name}.lst
%find_package_doc would look for the common files (README, AUTHORS, MAINTAINERS, ChangeLog, NEWS, COPYING, COPYING.LIB, TODO, etc.) by checking their existence and checking they're not empty. And it would output what it finds in %{name}.package_doc.
It could take additional arguments if people want to check for additional filenames or ignore some specific files.
Opinion?
While this may help add documentation files which had been inadvertently omitted, I fear this may just as well lead us to include files which we don't really need, effectively increasing the size of our package set and our disk space requirements. Not all upstream documentation files have an interest to be packaged. It really depends on what they contain, and that depends on upstream. For example, sometimes README only contains installation information, in which case we don't want to package it. It is also questionable whether we want to package TODO, as in general it is aimed at developers, not users, and developers will want to download the source package anyway. Sometimes ChangeLog and NEWS are redundant from the user's perspective. Some documentation files may belong to the -devel subpackage rather than the main subpackage. So I am not convinced that the decision of which documentation files should be included in what subpackage can easily be automated based on the file names. I also suspect that macros would make the spec files more obscure, as you would have no idea what is the default set of documentation file names, so you wouldn't know which file names to add or remove. Which basically suggests that nobody would actually use this extra feature: packagers would either use the default list, or use a custom list altogether. -- Jean Delvare Suse L3 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org