Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark man pages with RPMFILE_MAN and info pages with RPMFILE_INFO #1404

Closed
wants to merge 1 commit into from

Conversation

dcantrell
Copy link
Contributor

Define two additional file flags. One for man pages and one for info pages. These files are currently marked as RPMFILE_DOC during rpmbuild. This patch also marks man pages with RPMFILE_MAN and info pages with RPMFILE_INFO. The idea is that while they are still documentation, there will be further file flag details in the RPM header indicating what kind of docs they are. This patch could be extended to allow rpm to carry options like --excludeman and --excludeinfo, though if that happens the file flags may want to exclude man and info pages from RPMFILE_DOC entirely.

My motivation for these additional file flags are for use in rpminspect when performing tests on man pages or info pages. Right
now tools like rpminspect have to match man pages based on path and file type, which rpm already knows about. If the RPM header can carry a flag marking each man page, it makes tests in other tools easier. The same for info pages.

Signed-off-by: David Cantrell dcantrell@redhat.com

Define two additional file flags.  One for man pages and one for info
pages.  These files are currently marked as RPMFILE_DOC during
rpmbuild.  This patch also marks man pages with RPMFILE_MAN and info
pages with RPMFILE_INFO.  The idea is that while they are still
documentation, there will be further file flag details in the RPM
header indicating what kind of docs they are.  This patch could be
extended to allow rpm to carry options like --excludeman and
--excludeinfo, though if that happens the file flags may want to
exclude man and info pages from RPMFILE_DOC entirely.

My motivation for these additional file flags are for use in
rpminspect when performing tests on man pages or info pages.  Right
now tools like rpminspect have to match man pages based on path and
file type, which rpm already knows about.  If the RPM header can carry
a flag marking each man page, it makes tests in other tools easier.
The same for info pages.

Signed-off-by: David Cantrell <dcantrell@redhat.com>
@pmatilai
Copy link
Member

Sorry but no: a bitfield does not scale for classifying individual file formats, and that's not what the virtual file attributes are for.

A file magic string is attached to most files (RPMTAG_FILECLASS extension) which can be used for further identification, but it's not terribly reliable as the libmagic strings evolve over time. MIME classification should be more usable when we get that done (#1096)

@pmatilai pmatilai closed this Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants