[opensuse-packaging] rpm macro to find the standard package doc
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? Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Le samedi 28 février 2009, à 02:17 +0100, Vincent Untz a écrit :
%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.
And actually, it could even do the licenses stuff: http://en.opensuse.org/Packaging/Licenses It can be a bit too magic, though, since it should only be done if licenses is in Requires. (if it's not in BuildRequires, then the test would fail, so that wouldn't that much of an issue) Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Am Saturday 28 February 2009 02:22:15 schrieb Vincent Untz:
Le samedi 28 février 2009, à 02:17 +0100, Vincent Untz a écrit :
%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.
And actually, it could even do the licenses stuff: http://en.opensuse.org/Packaging/Licenses It can be a bit too magic, though, since it should only be done if licenses is in Requires. (if it's not in BuildRequires, then the test would fail, so that wouldn't that much of an issue)
Well, put that macro in licenses.rpm and then it's clear :) Greetings, Stephan -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Samstag 28 Februar 2009 02:17:55 Vincent Untz wrote:
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? That is an very interesting idea. Can you post the Code please? -- Sincereley yours
Sascha Manns openSUSE Marketing Team (Weekly News) openSUSE Build Service Web: http://saschamanns.gulli.to Blog: http://lizards.opensuse.org/author/saigkill -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
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
participants (4)
-
Jean Delvare
-
Sascha 'saigkill' Manns
-
Stephan Kulow
-
Vincent Untz