Re: man_MANS install locations

2022-08-31 Thread Russ Allbery
Jacob Bachmeyer  writes:

> This would be adapting to platform-specific requirements.  I suspect
> that Solaris man(1) will not look for svcadm.1m in man1 at all but only
> in man1m.

I would recommend testing that if you haven't, since I would have assumed
the opposite.  I'm fairly sure that, back when I was actively maintaining
and installing software on Solaris, I never bothered with separate
directories for the lettered subsections, and it never caused problems.

-- 
Russ Allbery (ea...@eyrie.org) 



Re: man_MANS install locations

2022-08-31 Thread Jacob Bachmeyer

Karl Berry wrote:

Hi Jan,

As for GNU/Linux, what was the rationale to only permit [0-9ln]?

No idea. Maybe just didn't think about "m", or maybe it didn't exist at
that time? Jim, Paul, anyone?

Should automake be relaxed? 


I see no harm in allowing more (any) letters, if that's what you mean.

When running automake on Solaris, placing svcadm.1m into man1 rather
than man1m seems outright wrong.

But is Automake's purpose to reproduce platform-specific behavior, or to
have consistent behavior across platforms?  I think the latter.
  


This would be adapting to platform-specific requirements.  I suspect 
that Solaris man(1) will not look for svcadm.1m in man1 at all but only 
in man1m.



I guess a new option to install *.1m in man1m/, etc., would be ok, if
you want it. If you or anyone can provide a patch, that would be
great. Unfortunately I doubt it's anything I will ever implement myself.
  


Maybe the best answer is to install into an existing directory if one is 
found and otherwise trim the suffix to the "standard" set?



Should the rpmlint check be adjusted to cater to the GNU FHS?

I guess that's a question for the rpmlint people, whoever they are.
I don't see that Automake's default behavior is going to change.

Also, GNU (as an organization) never had anything to do with the FHS,
so far as I know. I don't think the GNU coding standards/maintainer
information have anything to say about this topic ...
  


I seem to remember reading somewhere that /usr is supposed to be a 
symlink to / on the GNU system, so no, GNU is not intended to follow FHS.



-- Jacob



Re: man_MANS install locations

2022-08-31 Thread Karl Berry
Hi Jan,

As for GNU/Linux, what was the rationale to only permit [0-9ln]?

No idea. Maybe just didn't think about "m", or maybe it didn't exist at
that time? Jim, Paul, anyone?

Should automake be relaxed? 

I see no harm in allowing more (any) letters, if that's what you mean.

When running automake on Solaris, placing svcadm.1m into man1 rather
than man1m seems outright wrong.

But is Automake's purpose to reproduce platform-specific behavior, or to
have consistent behavior across platforms?  I think the latter.

I guess a new option to install *.1m in man1m/, etc., would be ok, if
you want it. If you or anyone can provide a patch, that would be
great. Unfortunately I doubt it's anything I will ever implement myself.

Should the rpmlint check be adjusted to cater to the GNU FHS?

I guess that's a question for the rpmlint people, whoever they are.
I don't see that Automake's default behavior is going to change.

Also, GNU (as an organization) never had anything to do with the FHS,
so far as I know. I don't think the GNU coding standards/maintainer
information have anything to say about this topic ... --thanks, karl.



man_MANS install locations

2022-08-31 Thread Jan Engelhardt
Greetings.


A check was impleneted in rpmlint[1] that verifies that a manual page file such
as "foo.3" has indeed been placed in ${mandir}/man3, and not, say,
${mandir}/man4.
[1] 
https://github.com/rpm-software-management/rpmlint/commit/6fe4be934d60119f9a969a8b8198037e3f1c7941

Ironically, that check immediately triggered elsewhere in another
package in openSUSE distro, because some "foo.3pm" was located not in
${mandir}/man3pm but ${mandir}/man3. Upon a little research, I find
that e.g. on Solaris/Illumos, *.1m man pages are indeed in
/usr/share/man/man1m and not /usr/share/man/man1.

Given the following Makefile.am fragment, I find that automake 1.16.5
places manpages such (on Linux as well as Solaris):

$ cat Makefile.am
man_MANS = svcadm.1m
$ make install DESTDIR=$PWD/rt
make[1]: Entering directory '/tmp'
make[1]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/tmp/rt/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 svcadm.1m '/tmp/rt/usr/local/share/man/man1'
make[1]: Leaving directory '/tmp'

Well, at least it is documented behavior:

```
   File extensions such as ‘.1c’ are handled by looking for the valid
part of the extension and using that to determine the correct
subdirectory of ‘mandir’.  Valid section names are the digits ‘0’
through ‘9’, and the letters ‘l’ and ‘n’.
```

When running automake on Solaris, placing svcadm.1m into man1 rather
than man1m seems outright wrong.
As for GNU/Linux, what was the rationale to only permit [0-9ln]?
Should automake be relaxed? Should the rpmlint check be adjusted
to cater to the GNU FHS?