On 04/21/2011 11:34 AM, Vít Ondruch wrote:
- I see most of rubygem packages also create -doc, but I can't find
which files should go this subpackage. I see most gem archive contains files like README, LICENSE, Rakefile, CHANGES and directories like tests, examples. I think it should be written on packaging page about which package should own these files.
This follows general packaging guidelines. The rule is that the base package should contain only essential files for execution, the rest should go into -doc. This includes Rakefile, testsuite, etc.
There is also the rule about staying as close as possible to the upstream package to consider as well.
http://fedoraproject.org/wiki/PackageMaintainers/WhyUpstream
- packaging page says %files should look like
%{gemdir}/gems/%{gemname}-%{version}/ %{gemdir}/cache/%{gemname}-%{version}.gem %{gemdir}/specifications/%{gemname}-%{version}.gemspec
but most of latest submitted/accepted packages have %dir %{geminstdir} %{geminstdir}
This is triggered by creation of the -doc subpackage. Once you decide to have -doc subpackage, then you can't include the whole %{geminstdir}, but you have to choose what to goes into what package.
I would like to see the -doc package as a requirement, since the documentation is typically several times bigger then the gem itself. Also I am not sure about others, but I usually prefer to use web documentation (rdoc.info).
There are packages though with little documentation, and I'd think it makes more sense to ship those with the package itself instead of a whole nother sub-package.
So my vote is to still leave it up to the packager but it's not a huge deal for me.
- I don't understand reason behind marking doc files as %doc whereas
I see they are not actually installed under /usr/share/doc. What I come to know only is that one can search for documentation files using RPM
There are 2 cases from my POV:
- You assume that the -doc subpackage contains only documentation,
therefore marking the files as %doc is not required. 2) In you case, the -doc subpackage can contain also test suite for example. In this case, the $ rpm -qd package-doc will show the real documentation files without the test suite.
Marking files as %doc helps from the perspective that you can pass in --excludedocs to "rpm -i".
This is useful for installing packages on systems w/ limited disk space, or without the documentation dependencies (man for example),
I would like to follow the 2nd approach, but the opinions may differ.
- gem install command is used with --rdoc in spec in latest submissions.
I would like to see --rdoc to be prohibited. It was always default and I don't believe it will change in near future.
Whats the reasoning behind prohibiting it?
- If its good practice to have %check in rubygem specs then we should
have it mentioned in packaging page.
The packaging guidelines encourages the test suite execution [3]. However I would love to see the ruby guidelines extended by my comments [4].
Correct, by default all ruby packages have to comply to the Fedora guidelines in addition to the Ruby guidelines.
-Mo