Hi,
Is it possible for man pages to use the %doc macro in the %files section in a spec file? In Guidelines, there's no explicit mention of it, and I haven't found a package having this behavior. However, I am reviewing spacewalk-pylint ( https://bugzilla.redhat.com/show_bug.cgi?id=800899 ), which does this:
%files %doc %{_mandir}/man8/spacewalk-pylint.8*
Can you please give me a stance on that?
Thank you,
On Wed, May 16, 2012 at 7:12 AM, Tomas Radej tradej@redhat.com wrote:
Hi,
Is it possible for man pages to use the %doc macro in the %files section in a spec file? In Guidelines, there's no explicit mention of it, and I haven't found a package having this behavior. However, I am reviewing spacewalk-pylint ( https://bugzilla.redhat.com/show_bug.cgi?id=800899 ), which does this:
%files %doc %{_mandir}/man8/spacewalk-pylint.8*
Can you please give me a stance on that?
It seems more logical to list the man page in the regular %files section, and leave doc for things like html, COPYING, README, etc. Though I've never tried the above, I'm not sure whether it would put the man page in /usr/share/doc/foo-version/, breaking man's ability to find it, or put it in the man dir, and allow it to be left out if --nodocs is passed.
Probably the latter, but I'd still keep it out of %doc. The only reason people would use --nodocs is to save space, and man pages are trivially small.
-J
Thank you,
-- Tomas Radej tradej@redhat.com -- packaging mailing list packaging@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/packaging
On Wed, 16 May 2012 07:20:56 -0500, JC (Jon) wrote:
On Wed, May 16, 2012 at 7:12 AM, Tomas Radej wrote:
Hi,
Is it possible for man pages to use the %doc macro in the %files section in a spec file? In Guidelines, there's no explicit mention of it, and I haven't found a package having this behavior. However, I am reviewing spacewalk-pylint ( https://bugzilla.redhat.com/show_bug.cgi?id=800899 ), which does this:
%files %doc %{_mandir}/man8/spacewalk-pylint.8*
Can you please give me a stance on that?
It seems more logical to list the man page in the regular %files section, and leave doc for things like html, COPYING, README, etc. Though I've never tried the above, I'm not sure whether it would put the man page in /usr/share/doc/foo-version/, breaking man's ability to find it, or put it in the man dir, and allow it to be left out if --nodocs is passed.
The %doc macro does two different things depending on whether you use it in conjunction with a _local_ file or an absolute path to a file. For the former, it installs a copy of that file in the default docdir as you've mentioned and marks it as Documentation. For the latter, it just marks the already installed file as Documentation.
Is there a standard way to uninstall an RPM? or would rpm -ev {package} will automatically remove ALL files. Thanks, -Kamal.
On 05/17/2012 01:48 PM, Kamal Ahmed wrote:
Is there a standard way to uninstall an RPM? or would rpm -ev {package} will automatically remove ALL files.
yes, rpm -e or yum erase are the standard mechanism to remove an RPM.
However the "ALL files" is a loaded question, one for which there has been much debate.
When rpm removes files it removes what is in the package file list. But the act of installing an rpm may create other files not in the package file list (consequences of things done in the rpm scriptlets). It's up to the spec file author to remove those during uninstall, it won't happen automatically. Not all all packages are so carefully written, but this is further compounded by the next issue
If you configure and/or run the programs in the package additional files unknown to rpm may also be created. In many instances those are data files. Just because you uninstall does that mean the data should be deleted as well? Many argue no. Consider a database, if you uninstall a database should you lose all your data? Perhaps you want to convert that data for use with a different database, etc. Thus this becomes a very package specific question and it's clear no one agrees completely.
So back to your original question. If you uninstall an rpm will *every* file be removed? Depends on the package, many won't.
On 05/16/2012 08:12 AM, Tomas Radej wrote:
Hi,
Is it possible for man pages to use the %doc macro in the %files section in a spec file? In Guidelines, there's no explicit mention of it, and I haven't found a package having this behavior. However, I am reviewing spacewalk-pylint ( https://bugzilla.redhat.com/show_bug.cgi?id=800899 ), which does this:
%files %doc %{_mandir}/man8/spacewalk-pylint.8*
RPM automagically marks everything in %{_mandir}/*/* as %doc, so there is no need to do that.
~tom
== Fedora Project
packaging@lists.fedoraproject.org