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

new check for man pages #918

Closed
DimStar77 opened this issue Aug 26, 2022 · 6 comments · Fixed by #919, #921 or #943
Closed

new check for man pages #918

DimStar77 opened this issue Aug 26, 2022 · 6 comments · Fixed by #919, #921 or #943
Assignees

Comments

@DimStar77
Copy link

rpmlint should warn/err on things like this:

/usr/share/man/man1/libcbor.3.gz

i.e. the check should validate that the directory /usr/share/man/man<n> only contains files matching *.<n>%{?ext_man} (ext_man is defined to the compression scheme used, e.g. .gz

@DimStar77
Copy link
Author

also: I don't think /usr/share/man/man<n> is supposed to contain further subdirectories; another trigger to yell at packagers

@marxin marxin self-assigned this Aug 26, 2022
marxin added a commit to marxin/rpmlint that referenced this issue Aug 26, 2022
marxin added a commit to marxin/rpmlint that referenced this issue Aug 26, 2022
marxin added a commit to marxin/rpmlint that referenced this issue Aug 26, 2022
marxin added a commit to marxin/rpmlint that referenced this issue Aug 28, 2022
marxin added a commit to marxin/rpmlint that referenced this issue Aug 28, 2022
marxin added a commit to marxin/rpmlint that referenced this issue Aug 28, 2022
marxin added a commit to marxin/rpmlint that referenced this issue Aug 28, 2022
marxin added a commit to marxin/rpmlint that referenced this issue Aug 29, 2022
marxin added a commit to marxin/rpmlint that referenced this issue Aug 29, 2022
@marxin marxin closed this as completed in 718e1eb Aug 30, 2022
@DimStar77
Copy link
Author

Seems we were a bit too strict with the new checks

e.g it is very common for perl modules to have a file called
topic.3pm.gz in /usr/share/man/man3 - which seems to be valid

this implies the folder name man<N> should contain files in the form *.<N>*.gz

(I've seen other suffixed than pm)

@jengelh
Copy link
Contributor

jengelh commented Aug 31, 2022

Due to automake, it has been common on GNU/Linux to place .3pm into /usr/share/man/man3.
This is in conflict with the way things were traditionally done (e.g. Solaris) where the full suffix is used, e.g. .1m ../man1m rather than ../man1.
An inquiry on the automake mailing list is pending.

marxin added a commit to marxin/rpmlint that referenced this issue Aug 31, 2022
Allow: folder name man<N> should contain files in the form *.<N>*.gz.

Fixes: rpm-software-management#918.
@tmzullinger
Copy link
Contributor

This appears to have caused a regression. Running rpmlint-2.4.0 against https://kojipkgs.fedoraproject.org//packages/shigofumi/0.9/5.fc37/x86_64/shigofumi-0.9-5.fc37.x86_64.rpm results in:

shigofumi.x86_64: W: no-manual-page-for-binary shigofumi

The package contains a matching man page. This works in 2.3.0 or in 2.4.0 if I revert FilesCheck.py to 718e1eb^.

$ rpm -qplv shigofumi-0.9-5.fc37.x86_64.rpm | grep -E ' /usr/(bin|share/man)' | grep -w shigofumi
-rwxr-xr-x    1 root     root                   191240 Jul 23 08:38 /usr/bin/shigofumi
-rw-r--r--    1 root     root                     3941 Jul 23 08:38 /usr/share/man/cs/man1/shigofumi.1.gz
-rw-r--r--    1 root     root                     3372 Aug 18  2015 /usr/share/man/man1/shigofumi.1.gz

Before I go digging, is the cause obvious to anyone here who worked on this change? My first thought is that the translated man page is what the code may be tripping over.

@marxin
Copy link
Contributor

marxin commented Oct 7, 2022

Thanks for the report, apparently I screwed up the regex pattern, I've got a patch candidate.

@marxin marxin reopened this Oct 7, 2022
@tmzullinger
Copy link
Contributor

Thanks @marxin! I was hoping it would be more obvious to someone familiar with the code. I also hope it's an easy fix. Much appreciated!

marxin added a commit to marxin/rpmlint that referenced this issue Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants