LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   The "man" command is an "alternate"? Why? (https://www.linuxquestions.org/questions/suse-opensuse-60/the-man-command-is-an-alternate-why-4175681614/)

rnturn 09-05-2020 02:10 PM

The "man" command is an "alternate"? Why?
 
After applying the latest round up updates to Tumbleweed yesterday, noticed that some things were broken: "man" for one. There was no "man" command available. I issued "file $( which man )" and found that it was supposed to be a symbolic link to "/etc/alternatives/man" but it was broken. The object under "/etc/alternatives" was, in turn, a symbolic link to "/usr/libexec/man-db/wrapper". Outside of a few messages regarding permissions changes that always show up during update installations, I saw no error messages related to the updates to the "man" packages.

(Leaving the system without a working "man" is something of a show stopper so I give these updates a grade of "F".)

Fortunately, YaST was not broken by the updates and I was able to remove "man" and the "manpage" packages and re-install them.

Q: Why has "man" been relegated to "alternate" status?

I suppose a related question would be when was this was done as I noticed it's also "alternate" on a Leap 15.1 system. (I likely wouldn't have noticed had the Tumbleweed updates not borked the command.) Ultimately, the question is:
Alternate to what exactly?
My internet searches aren't finding anything and I would expect there'd have been a lot of discussion about this change. Does nobody read manpages any more?

Anyone have information about this?

Cheers...

ondoho 09-05-2020 03:12 PM

Does "alternate" mean something like "optional" in SUSE-speak?
It would be strange indeed if distro maintainers considered man pages (and a program to access them) optional.
OTOH, this is rather common on e.g. mobile device distros.

rnturn 09-05-2020 10:48 PM

Quote:

Originally Posted by ondoho (Post 6162904)
Does "alternate" mean something like "optional" in SUSE-speak?
It would be strange indeed if distro maintainers considered man pages (and a program to access them) optional.
OTOH, this is rather common on e.g. mobile device distros.

I'm unsure of what the maintainers mean by that but there's a fairly large number of symbolic links in "/usr/bin" pointing to "/etc/alternatives", links in "/etc/alternatives" pointing to "/usr/libexec" and "/usr/bin". It's kinda nuts: my PATH says to look for "man" in "/usr/bin" which then has to hit "/etc/alternatives" which, in turns has to hit "/usr/libexec" (I stopped following the symbolic links at that point). The point of this is...? Hmm... I got nuthin'. Obviously somebody has a (weird) plan though I've not seen anything on the OpenSUSE forums about why such a change is deemed "necessary".

Anyway, I can't see mucking around with "man" being a positive thing... especially when an update silently breaks it.

Cheers...

ondoho 09-06-2020 02:41 AM

Quote:

Originally Posted by rnturn (Post 6163002)
there's a fairly large number of symbolic links in "/usr/bin" pointing to "/etc/alternatives", links in "/etc/alternatives" pointing to "/usr/libexec" and "/usr/bin". It's kinda nuts: my PATH says to look for "man" in "/usr/bin" which then has to hit "/etc/alternatives" which, in turns has to hit "/usr/libexec" (I stopped following the symbolic links at that point). The point of this is...?

This is also happening on Debian systems and is not a new thing: https://wiki.debian.org/DebianAlternatives

shruggy 09-06-2020 06:18 AM

Quote:

Originally Posted by rnturn (Post 6163002)
The point of this is...?

This usually means there's more than one package providing /usr/bin/man. The alternatives system allows you to have them all installed in parallel and then select which one will be your /usr/bin/man of choice.

E.g. on openSUSE, /usr/bin/man is provided both by man (from the man-db project) and mandoc (from OpenBSD).

frankbell 09-06-2020 07:49 PM

For what it's worth, I just tried man in a VM of OpenSUSE Leap v. 15.2 and was unable to duplicate OP's issue. Instead, I got this (replicated several times on different topics):

Code:

:~> man ls
Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)
 * ls (1)
  ls (1p)
Man: What manual page do you want?

After a short delay, it would open one of the pages, I think the "man 1" page, but my attempts to verify that were fruitless.

A web search for "MAN_POSIXLY_CORRECT" led me to this in the OpenSUSE v. 11.1 release notes.

Code:

Displaying Man-Pages With the Same Name

The man command now asks which man-page the user wants to see if man-pages with the same name exist in different sections. The user is expected to type the section number to make this man-page visible.

If you want to get back the previous behavior, set MAN_POSIXLY_CORRECT=1 in a shell initialization file such as ~/.bashrc.

I fail to see the utility of this change to the manual system, but that's just me.

Sauerland 09-07-2020 04:04 PM

https://bugzilla.opensuse.org/show_bug.cgi?id=1175919

rnturn 09-08-2020 11:44 AM

Quote:

Originally Posted by frankbell (Post 6163274)
For what it's worth, I just tried man in a VM of OpenSUSE Leap v. 15.2 and was unable to duplicate OP's issue. Instead, I got this (replicated several times on different topics):

Code:

:~> man ls
Man: find all matching manual pages (set MAN_POSIXLY_CORRECT to avoid this)
 * ls (1)
  ls (1p)
Man: What manual page do you want?

After a short delay, it would open one of the pages, I think the "man 1" page, but my attempts to verify that were fruitless.

A web search for "MAN_POSIXLY_CORRECT" led me to this in the OpenSUSE v. 11.1 release notes.

Code:

Displaying Man-Pages With the Same Name

The man command now asks which man-page the user wants to see if man-pages with the same name exist in different sections. The user is expected to type the section number to make this man-page visible.

If you want to get back the previous behavior, set MAN_POSIXLY_CORRECT=1 in a shell initialization file such as ~/.bashrc.

I fail to see the utility of this change to the manual system, but that's just me.

Me, too. I recall the POSIXLY_CORRECT "fix" from ages ago.

I've never noticed man timing out and deciding to jump to a page if you weren't quick enough to answer that question about sections. But... I still have that environment variable set to "1". Is that the reason it became an alternative? Shees.

Still doesn't explain how the update managed to break man to the point where I had to uninstall/re-install to get it working again.

I appreciate the replies... thanks all.

rnturn 09-08-2020 12:39 PM

Quote:

Originally Posted by Sauerland (Post 6163582)

Thanks for the link.

I noticed that sshd was moved to /usr/libexec, too, though it left /usr/sbin/sshd alone. That broke sftp connections to that system but, oddly, not ssh connections. Minor tweak to /etc/ssh/sshd_config fixes that. I noticed that "sshd_config.rpmnew" file has PermitRootLogin defaulting to "Yes". Ugh.

Cheers...


All times are GMT -5. The time now is 01:14 AM.