public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Does /etc/profile need to set MANPATH?
@ 2014-05-13 18:57 Chris J. Breisch
  2014-05-13 19:25 ` Corinna Vinschen
  0 siblings, 1 reply; 18+ messages in thread
From: Chris J. Breisch @ 2014-05-13 18:57 UTC (permalink / raw)
  To: cygwin

I've been working on getting man-db in a state where I can submit a 
package for it. I had been baffled by the failure of one of the tests 
that was dealing with overriding the man_db.conf file, so had been 
struggling to get a version that passes everything before I submitted it.

I finally discovered that the root cause was that MANPATH was being set 
from /etc/profile and that this value was conflicting with the test and 
causing it to fail. Unsetting MANPATH allowed the test to succeed[1].

My question is then, is it necessary to set this value? Is it something 
required by the current version of man that we're using? If so, man-db 
seems to override this necessity as it makes considerable effort to work 
out a reasonable manpath on it's own.

Perhaps this discussion belongs in cygwin-apps. I'll be happy to take it 
elsewhere.

-----------
[1] The failure of this test also seems to me to indicate an upstream 
bug. If MANPATH is set, man-db always ignores the data in the 
man_db.conf file, even if the conf file is specified on the command 
line. Worse, man-db actually reads the conf file, but then ignores the 
data. Perhaps this is working as designed, but if so, the design seems 
flawed from my perspective. From my research, this does not appear to be 
a Cygwin specific issue, although I haven't yet tried to reproduce it on 
a Linux system.


-- 
Chris J. Breisch

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2014-05-13 18:57 Does /etc/profile need to set MANPATH? Chris J. Breisch
@ 2014-05-13 19:25 ` Corinna Vinschen
  2014-05-14 17:08   ` Achim Gratz
  0 siblings, 1 reply; 18+ messages in thread
From: Corinna Vinschen @ 2014-05-13 19:25 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1916 bytes --]

On May 13 14:54, Chris J. Breisch wrote:
> I've been working on getting man-db in a state where I can submit a package
> for it. I had been baffled by the failure of one of the tests that was
> dealing with overriding the man_db.conf file, so had been struggling to get
> a version that passes everything before I submitted it.
> 
> I finally discovered that the root cause was that MANPATH was being set from
> /etc/profile and that this value was conflicting with the test and causing
> it to fail. Unsetting MANPATH allowed the test to succeed[1].
> 
> My question is then, is it necessary to set this value? Is it something
> required by the current version of man that we're using? If so, man-db seems
> to override this necessity as it makes considerable effort to work out a
> reasonable manpath on it's own.
> 
> Perhaps this discussion belongs in cygwin-apps. I'll be happy to take it
> elsewhere.

Yes, this might be better discussed in cygwin-apps.  I guess the setting
of MANPATH is mainly historical.

> -----------
> [1] The failure of this test also seems to me to indicate an upstream bug.
> If MANPATH is set, man-db always ignores the data in the man_db.conf file,
> even if the conf file is specified on the command line. Worse, man-db
> actually reads the conf file, but then ignores the data. Perhaps this is
> working as designed, but if so, the design seems flawed from my perspective.
> From my research, this does not appear to be a Cygwin specific issue,
> although I haven't yet tried to reproduce it on a Linux system.

Be careful when this works differently on Linux.  The distro you're
testing this on might have additional patches applied, too...
I would suggest to discuss this upstream.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2014-05-13 19:25 ` Corinna Vinschen
@ 2014-05-14 17:08   ` Achim Gratz
  2014-05-15  7:56     ` Corinna Vinschen
  0 siblings, 1 reply; 18+ messages in thread
From: Achim Gratz @ 2014-05-14 17:08 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
> Yes, this might be better discussed in cygwin-apps.  I guess the setting
> of MANPATH is mainly historical.

I'd be happy to not set MANPATH in /etc/profile if we no longer need it
for the standard installation.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2014-05-14 17:08   ` Achim Gratz
@ 2014-05-15  7:56     ` Corinna Vinschen
  2014-05-15 13:18       ` Chris J. Breisch
  0 siblings, 1 reply; 18+ messages in thread
From: Corinna Vinschen @ 2014-05-15  7:56 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 952 bytes --]

On May 14 18:52, Achim Gratz wrote:
> Corinna Vinschen writes:
> > Yes, this might be better discussed in cygwin-apps.  I guess the setting
> > of MANPATH is mainly historical.
> 
> I'd be happy to not set MANPATH in /etc/profile if we no longer need it
> for the standard installation.

I'm wondering if setting MANPATH was really ever required for the old
man either.  In a tcsh environment, MANPATH is not set by default.
If you install the openssl package, MANPATH is set like this (in
/etc/profile.d/openssh.csh):

  if ( ! $?MANPATH ) setenv MANPATH ""
  setenv MANPATH "${MANPATH}:/usr/ssl/man"

which results in:

  $ echo $MANPATH
  :/usr/ssl/man

I have neither problems to see the man pages in the default paths nor
problems to see the openssl man pages.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2014-05-15  7:56     ` Corinna Vinschen
@ 2014-05-15 13:18       ` Chris J. Breisch
  2014-05-15 13:39         ` Chris J. Breisch
  0 siblings, 1 reply; 18+ messages in thread
From: Chris J. Breisch @ 2014-05-15 13:18 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen wrote:
> On May 14 18:52, Achim Gratz wrote:
>> Corinna Vinschen writes:
>>> Yes, this might be better discussed in cygwin-apps.  I guess the setting
>>> of MANPATH is mainly historical.
>> I'd be happy to not set MANPATH in /etc/profile if we no longer need it
>> for the standard installation.
>
> I'm wondering if setting MANPATH was really ever required for the old
> man either.  In a tcsh environment, MANPATH is not set by default.
> If you install the openssl package, MANPATH is set like this (in
> /etc/profile.d/openssh.csh):
>
>    if ( ! $?MANPATH ) setenv MANPATH ""
>    setenv MANPATH "${MANPATH}:/usr/ssl/man"
>
> which results in:
>
>    $ echo $MANPATH
>    :/usr/ssl/man
>
> I have neither problems to see the man pages in the default paths nor
> problems to see the openssl man pages.

Well, /etc/profile and /etc/profile.d/openssh.sh add a few more folders 
to MANPATH in bash. If your man pages are working, then we probably 
don't need MANPATH.

I'm guessing though that if you unset MANPATH, you can't see the man 
pages in /usr/ssl/man. The new man from man-db doesn't find them either, 
however.

But I think the proper solution to that is to add the appropriate lines 
to man_db.conf rather than to force something into MANPATH. OTOH, we 
already have the openssh.[c]sh files working, so maybe it's easier to 
continue with that, rather than modifying the OpenSSL package to update 
man_db.conf.

I still need to verify that the problem I found with man-db and MANPATH 
is an upstream problem. I have an LFS system that I can use to test that 
and will do so later today.


-- 
Chris J. Breisch

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2014-05-15 13:18       ` Chris J. Breisch
@ 2014-05-15 13:39         ` Chris J. Breisch
  2014-05-15 13:49           ` Corinna Vinschen
  0 siblings, 1 reply; 18+ messages in thread
From: Chris J. Breisch @ 2014-05-15 13:39 UTC (permalink / raw)
  To: cygwin

Chris J. Breisch wrote:
> Corinna Vinschen wrote:
>> On May 14 18:52, Achim Gratz wrote:
>>> Corinna Vinschen writes:
>>>> Yes, this might be better discussed in cygwin-apps. I guess the setting
>>>> of MANPATH is mainly historical.
>>> I'd be happy to not set MANPATH in /etc/profile if we no longer need it
>>> for the standard installation.
>>
>> I'm wondering if setting MANPATH was really ever required for the old
>> man either. In a tcsh environment, MANPATH is not set by default.
>> If you install the openssl package, MANPATH is set like this (in
>> /etc/profile.d/openssh.csh):
>>
>> if ( ! $?MANPATH ) setenv MANPATH ""
>> setenv MANPATH "${MANPATH}:/usr/ssl/man"
>>
>> which results in:
>>
>> $ echo $MANPATH
>> :/usr/ssl/man
>>
>> I have neither problems to see the man pages in the default paths nor
>> problems to see the openssl man pages.
>
> Well, /etc/profile and /etc/profile.d/openssh.sh add a few more folders
> to MANPATH in bash. If your man pages are working, then we probably
> don't need MANPATH.
>
> I'm guessing though that if you unset MANPATH, you can't see the man
> pages in /usr/ssl/man. The new man from man-db doesn't find them either,
> however.
>
> But I think the proper solution to that is to add the appropriate lines
> to man_db.conf rather than to force something into MANPATH. OTOH, we
> already have the openssh.[c]sh files working, so maybe it's easier to
> continue with that, rather than modifying the OpenSSL package to update
> man_db.conf.
>

Or I could just add the values to man_db.conf, regardless of whether 
OpenSSL is installed. It's not going to hurt anything to have them there.

> I still need to verify that the problem I found with man-db and MANPATH
> is an upstream problem. I have an LFS system that I can use to test that
> and will do so later today.
>
>


-- 
Chris J. Breisch

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2014-05-15 13:39         ` Chris J. Breisch
@ 2014-05-15 13:49           ` Corinna Vinschen
  2014-05-15 17:48             ` Larry Hall (Cygwin)
                               ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Corinna Vinschen @ 2014-05-15 13:49 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2481 bytes --]

On May 15 09:17, Chris J. Breisch wrote:
> Chris J. Breisch wrote:
> >Corinna Vinschen wrote:
> >>On May 14 18:52, Achim Gratz wrote:
> >>>Corinna Vinschen writes:
> >>>>Yes, this might be better discussed in cygwin-apps. I guess the setting
> >>>>of MANPATH is mainly historical.
> >>>I'd be happy to not set MANPATH in /etc/profile if we no longer need it
> >>>for the standard installation.
> >>
> >>I'm wondering if setting MANPATH was really ever required for the old
> >>man either. In a tcsh environment, MANPATH is not set by default.
> >>If you install the openssl package, MANPATH is set like this (in
> >>/etc/profile.d/openssh.csh):
> >>
> >>if ( ! $?MANPATH ) setenv MANPATH ""
> >>setenv MANPATH "${MANPATH}:/usr/ssl/man"
> >>
> >>which results in:
> >>
> >>$ echo $MANPATH
> >>:/usr/ssl/man
> >>
> >>I have neither problems to see the man pages in the default paths nor
> >>problems to see the openssl man pages.
> >
> >Well, /etc/profile and /etc/profile.d/openssh.sh add a few more folders
> >to MANPATH in bash. If your man pages are working, then we probably
> >don't need MANPATH.
> >
> >I'm guessing though that if you unset MANPATH, you can't see the man
> >pages in /usr/ssl/man. The new man from man-db doesn't find them either,
> >however.
> >
> >But I think the proper solution to that is to add the appropriate lines
> >to man_db.conf rather than to force something into MANPATH. OTOH, we
> >already have the openssh.[c]sh files working, so maybe it's easier to
> >continue with that, rather than modifying the OpenSSL package to update
> >man_db.conf.
> >
> 
> Or I could just add the values to man_db.conf, regardless of whether OpenSSL
> is installed. It's not going to hurt anything to have them there.

You still have to be able to handle MANPATH.  Unfortunately the man page
of man-db is a little tight-lipped on how MANPATH is handled exactly,
other than that "its value is used as the path to search  for manual
pages."

Whatever man does with MANPATH, it doesn't drop the default man paths,
apparently.

[...time passes...]

Hmm.  Interesting enough, the current /etc/man.conf already contains
/usr/ssl/man.  How long is it doing that already?  If I had known that,
I'd removed the /etc/profile.d/openssl.* files long ago :|


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2014-05-15 13:49           ` Corinna Vinschen
@ 2014-05-15 17:48             ` Larry Hall (Cygwin)
  2014-05-16 12:14               ` Corinna Vinschen
  2014-05-16 20:00             ` Chris J. Breisch
  2014-05-17 20:59             ` Michael Wild
  2 siblings, 1 reply; 18+ messages in thread
From: Larry Hall (Cygwin) @ 2014-05-15 17:48 UTC (permalink / raw)
  To: cygwin

On 05/15/2014 09:39 AM, Corinna Vinschen wrote:
> On May 15 09:17, Chris J. Breisch wrote:
>> Chris J. Breisch wrote:
>>> Corinna Vinschen wrote:
>>>> On May 14 18:52, Achim Gratz wrote:
>>>>> Corinna Vinschen writes:
>>>>>> Yes, this might be better discussed in cygwin-apps. I guess the setting
>>>>>> of MANPATH is mainly historical.
>>>>> I'd be happy to not set MANPATH in /etc/profile if we no longer need it
>>>>> for the standard installation.
>>>>
>>>> I'm wondering if setting MANPATH was really ever required for the old
>>>> man either. In a tcsh environment, MANPATH is not set by default.
>>>> If you install the openssl package, MANPATH is set like this (in
>>>> /etc/profile.d/openssh.csh):
>>>>
>>>> if ( ! $?MANPATH ) setenv MANPATH ""
>>>> setenv MANPATH "${MANPATH}:/usr/ssl/man"
>>>>
>>>> which results in:
>>>>
>>>> $ echo $MANPATH
>>>> :/usr/ssl/man
>>>>
>>>> I have neither problems to see the man pages in the default paths nor
>>>> problems to see the openssl man pages.
>>>
>>> Well, /etc/profile and /etc/profile.d/openssh.sh add a few more folders
>>> to MANPATH in bash. If your man pages are working, then we probably
>>> don't need MANPATH.
>>>
>>> I'm guessing though that if you unset MANPATH, you can't see the man
>>> pages in /usr/ssl/man. The new man from man-db doesn't find them either,
>>> however.
>>>
>>> But I think the proper solution to that is to add the appropriate lines
>>> to man_db.conf rather than to force something into MANPATH. OTOH, we
>>> already have the openssh.[c]sh files working, so maybe it's easier to
>>> continue with that, rather than modifying the OpenSSL package to update
>>> man_db.conf.
>>>
>>
>> Or I could just add the values to man_db.conf, regardless of whether OpenSSL
>> is installed. It's not going to hurt anything to have them there.
>
> You still have to be able to handle MANPATH.  Unfortunately the man page
> of man-db is a little tight-lipped on how MANPATH is handled exactly,
> other than that "its value is used as the path to search  for manual
> pages."
>
> Whatever man does with MANPATH, it doesn't drop the default man paths,
> apparently.
>
> [...time passes...]
>
> Hmm.  Interesting enough, the current /etc/man.conf already contains
> /usr/ssl/man.  How long is it doing that already?  If I had known that,
> I'd removed the /etc/profile.d/openssl.* files long ago :|

I'm not sure exactly but a quick look in the Cygwin email archives shows
a reference from 2005 with it.  We were very forward-thinking back then. ;-)

-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in email?

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2014-05-15 17:48             ` Larry Hall (Cygwin)
@ 2014-05-16 12:14               ` Corinna Vinschen
  2014-05-17  8:50                 ` Achim Gratz
  0 siblings, 1 reply; 18+ messages in thread
From: Corinna Vinschen @ 2014-05-16 12:14 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 747 bytes --]

On May 15 13:47, Larry Hall (Cygwin) wrote:
> On 05/15/2014 09:39 AM, Corinna Vinschen wrote:
> >Hmm.  Interesting enough, the current /etc/man.conf already contains
> >/usr/ssl/man.  How long is it doing that already?  If I had known that,
> >I'd removed the /etc/profile.d/openssl.* files long ago :|
> 
> I'm not sure exactly but a quick look in the Cygwin email archives shows
> a reference from 2005 with it.  We were very forward-thinking back then. ;-)

It does?  Did I miss it?  Oh well.

Whatever, it looks like MANPATH can really go away.  Achim, do your worst.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2014-05-15 13:49           ` Corinna Vinschen
  2014-05-15 17:48             ` Larry Hall (Cygwin)
@ 2014-05-16 20:00             ` Chris J. Breisch
  2014-05-17 20:59             ` Michael Wild
  2 siblings, 0 replies; 18+ messages in thread
From: Chris J. Breisch @ 2014-05-16 20:00 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen wrote:
> On May 15 09:17, Chris J. Breisch wrote:
>> Chris J. Breisch wrote:
>>> Corinna Vinschen wrote:
>>>> On May 14 18:52, Achim Gratz wrote:
>>>>> Corinna Vinschen writes:
>>>>>> Yes, this might be better discussed in cygwin-apps. I guess the setting
>>>>>> of MANPATH is mainly historical.
>>>>> I'd be happy to not set MANPATH in /etc/profile if we no longer need it
>>>>> for the standard installation.
>>>> I'm wondering if setting MANPATH was really ever required for the old
>>>> man either. In a tcsh environment, MANPATH is not set by default.
>>>> If you install the openssl package, MANPATH is set like this (in
>>>> /etc/profile.d/openssh.csh):
>>>>
>>>> if ( ! $?MANPATH ) setenv MANPATH ""
>>>> setenv MANPATH "${MANPATH}:/usr/ssl/man"
>>>>
>>>> which results in:
>>>>
>>>> $ echo $MANPATH
>>>> :/usr/ssl/man
>>>>
>>>> I have neither problems to see the man pages in the default paths nor
>>>> problems to see the openssl man pages.
>>> Well, /etc/profile and /etc/profile.d/openssh.sh add a few more folders
>>> to MANPATH in bash. If your man pages are working, then we probably
>>> don't need MANPATH.
>>>
>>> I'm guessing though that if you unset MANPATH, you can't see the man
>>> pages in /usr/ssl/man. The new man from man-db doesn't find them either,
>>> however.
>>>
>>> But I think the proper solution to that is to add the appropriate lines
>>> to man_db.conf rather than to force something into MANPATH. OTOH, we
>>> already have the openssh.[c]sh files working, so maybe it's easier to
>>> continue with that, rather than modifying the OpenSSL package to update
>>> man_db.conf.
>>>
>> Or I could just add the values to man_db.conf, regardless of whether OpenSSL
>> is installed. It's not going to hurt anything to have them there.
>
> You still have to be able to handle MANPATH.  Unfortunately the man page
> of man-db is a little tight-lipped on how MANPATH is handled exactly,
> other than that "its value is used as the path to search  for manual
> pages."
>
> Whatever man does with MANPATH, it doesn't drop the default man paths,
> apparently.
>

It's not that man-db doesn't handle MANPATH, it's that it gives too much 
power to it, I think.

MANPATH always overrides whatever is in man_db.conf, even if you specify 
an override conf file on the command line with man -C <conf file>.

I have verified that this happens in my LFS system. So, either I don't 
understand how this is supposed to work, or this is an upstream problem.

I'll send something to the man-db group about it this weekend, and 
hopefully work some more on getting this packaged up as well.


-- 
Chris J. Breisch

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2014-05-16 12:14               ` Corinna Vinschen
@ 2014-05-17  8:50                 ` Achim Gratz
  2015-07-20 12:09                   ` Mikhail Usenko
  0 siblings, 1 reply; 18+ messages in thread
From: Achim Gratz @ 2014-05-17  8:50 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
> Whatever, it looks like MANPATH can really go away.  Achim, do your worst.

Done.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptations for KORG EX-800 and Poly-800MkII V0.9:
http://Synth.Stromeko.net/Downloads.html#KorgSDada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2014-05-15 13:49           ` Corinna Vinschen
  2014-05-15 17:48             ` Larry Hall (Cygwin)
  2014-05-16 20:00             ` Chris J. Breisch
@ 2014-05-17 20:59             ` Michael Wild
  2014-05-19  9:38               ` Corinna Vinschen
  2 siblings, 1 reply; 18+ messages in thread
From: Michael Wild @ 2014-05-17 20:59 UTC (permalink / raw)
  To: cygwin

On 15.05.2014 15:39, Corinna Vinschen wrote:
[...]
> 
> You still have to be able to handle MANPATH.  Unfortunately the man page
> of man-db is a little tight-lipped on how MANPATH is handled exactly,
> other than that "its value is used as the path to search  for manual
> pages."
> 
> Whatever man does with MANPATH, it doesn't drop the default man paths,
> apparently.
> 
> [...time passes...]
> 
> Hmm.  Interesting enough, the current /etc/man.conf already contains
> /usr/ssl/man.  How long is it doing that already?  If I had known that,
> I'd removed the /etc/profile.d/openssl.* files long ago :|
> 
> 
> Corinna
> 


Dear all

AFAIK the behavior is as usual for *NIX search paths, with two notable exceptions:

* A trailing or leading colon means that at this position the default search path from the configuration files is inserted
* A double-colon (::) anywhere means that at this position the default search path is inserted

Refer to the ENVIRONMENT section of manpath(1), http://manpages.ubuntu.com/man1/manpath.1.

Cheers, and a pleasant weekend

Michael

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2014-05-17 20:59             ` Michael Wild
@ 2014-05-19  9:38               ` Corinna Vinschen
  0 siblings, 0 replies; 18+ messages in thread
From: Corinna Vinschen @ 2014-05-19  9:38 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1471 bytes --]

On May 17 20:17, Michael Wild wrote:
> On 15.05.2014 15:39, Corinna Vinschen wrote:
> [...]
> > 
> > You still have to be able to handle MANPATH.  Unfortunately the man page
> > of man-db is a little tight-lipped on how MANPATH is handled exactly,
> > other than that "its value is used as the path to search  for manual
> > pages."
> > 
> > Whatever man does with MANPATH, it doesn't drop the default man paths,
> > apparently.
> > 
> > [...time passes...]
> > 
> > Hmm.  Interesting enough, the current /etc/man.conf already contains
> > /usr/ssl/man.  How long is it doing that already?  If I had known that,
> > I'd removed the /etc/profile.d/openssl.* files long ago :|
> > 
> > 
> > Corinna
> > 
> 
> 
> Dear all
> 
> AFAIK the behavior is as usual for *NIX search paths, with two notable exceptions:
> 
> * A trailing or leading colon means that at this position the default search path from the configuration files is inserted
> * A double-colon (::) anywhere means that at this position the default search path is inserted
> 
> Refer to the ENVIRONMENT section of manpath(1), http://manpages.ubuntu.com/man1/manpath.1.

Oh, wow, manpath has its own man page.  The above information (leading
colon, etc) was exactly what I waas missing in the man manpages.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2014-05-17  8:50                 ` Achim Gratz
@ 2015-07-20 12:09                   ` Mikhail Usenko
  2015-07-20 12:20                     ` Michael DePaulo
  0 siblings, 1 reply; 18+ messages in thread
From: Mikhail Usenko @ 2015-07-20 12:09 UTC (permalink / raw)
  To: cygwin

On Sat, 17 May 2014 10:37:30 +0200
Achim Gratz <...> wrote:

> Corinna Vinschen writes:
> > Whatever, it looks like MANPATH can really go away.  Achim, do your worst.
> 
> Done.
> 

Besides defining MANPATH (and the other variables such as INFOPATH and PATH which can be modified by the user's .bash_profile) /etc/profile also did export the MANPATH variable.
Now it does not and I suppose  that user's skeleton file /etc/skel/.bash_profile should provide user-defined MANPATH pro-forma as an exported environment variable or else it will have no effect.

-- 
Mike

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2015-07-20 12:09                   ` Mikhail Usenko
@ 2015-07-20 12:20                     ` Michael DePaulo
  2015-07-20 13:43                       ` Mikhail Usenko
  0 siblings, 1 reply; 18+ messages in thread
From: Michael DePaulo @ 2015-07-20 12:20 UTC (permalink / raw)
  To: The Cygwin Mailing List

On Mon, Jul 20, 2015 at 8:09 AM, Mikhail Usenko <cygwin@inbox.ru> wrote:
> On Sat, 17 May 2014 10:37:30 +0200
> Achim Gratz <...> wrote:
>
>> Corinna Vinschen writes:
>> > Whatever, it looks like MANPATH can really go away.  Achim, do your worst.
>>
>> Done.
>>
>
> Besides defining MANPATH (and the other variables such as INFOPATH and PATH which can be modified by the user's .bash_profile) /etc/profile also did export the MANPATH variable.
> Now it does not and I suppose  that user's skeleton file /etc/skel/.bash_profile should provide user-defined MANPATH pro-forma as an exported environment variable or else it will have no effect.
>
> --
> Mike
[...]

Why does Cygwin need to define MANPATH by default? Cygwin uses
/etc/man_db.conf, just like the Red Hat family of Linux distros. (The
Debian family uses /etc/manpath.config).

-Mike D

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2015-07-20 12:20                     ` Michael DePaulo
@ 2015-07-20 13:43                       ` Mikhail Usenko
  2015-07-20 14:15                         ` Mikhail Usenko
  2015-07-20 16:21                         ` Achim Gratz
  0 siblings, 2 replies; 18+ messages in thread
From: Mikhail Usenko @ 2015-07-20 13:43 UTC (permalink / raw)
  To: cygwin

On Mon, 20 Jul 2015 08:20:12 -0400
Michael DePaulo <...> wrote:

> On Mon, Jul 20, 2015 at 8:09 AM, Mikhail Usenko <cygwin@inbox.ru> wrote:
> > On Sat, 17 May 2014 10:37:30 +0200
> > Achim Gratz <...> wrote:
> >
> >> Corinna Vinschen writes:
> >> > Whatever, it looks like MANPATH can really go away.  Achim, do your worst.
> >>
> >> Done.
> >>
> >
> > Besides defining MANPATH (and the other variables such as INFOPATH and PATH which can be modified by the user's .bash_profile) /etc/profile also did export the MANPATH variable.
> > Now it does not and I suppose  that user's skeleton file /etc/skel/.bash_profile should provide user-defined MANPATH pro-forma as an exported environment variable or else it will have no effect.
> >
> > --
> > Mike
> [...]
> 
> Why does Cygwin need to define MANPATH by default? Cygwin uses
> /etc/man_db.conf, just like the Red Hat family of Linux distros. (The
> Debian family uses /etc/manpath.config).
> 

The point is that the current stanza for MANPATH in /etc/skel/.bash_profile
--- %< ---
# Set MANPATH so it includes users' private man if it exists
# if [ -d "${HOME}/man" ]; then
#   MANPATH="${HOME}/man:${MANPATH}"
# fi
--- >8 ---
is not useful because for:
1) if you run manpath from the command line in clean Cygwin installation you find out that
"${HOME}/man" is (and always remains) in your searching path by default even if you have no "${HOME}/man"
in your home directory path
2) if you are minded to add your private man pages like this:
MANPATH="${HOME}/my-man-pages:${MANPATH}"
it will not work. Now you should mark the variable for export:
export MANPATH="${HOME}/my-man-pages:${MANPATH}"

I suggest to change the skeleton file to something like this:
--- %< ---
# Set MANPATH so it includes users' private man
# export MANPATH="${HOME}/manpages:${MANPATH}"
--- >8 ---


-- 
Mike


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2015-07-20 13:43                       ` Mikhail Usenko
@ 2015-07-20 14:15                         ` Mikhail Usenko
  2015-07-20 16:21                         ` Achim Gratz
  1 sibling, 0 replies; 18+ messages in thread
From: Mikhail Usenko @ 2015-07-20 14:15 UTC (permalink / raw)
  To: cygwin

On Mon, 20 Jul 2015 16:42:49 +0300
Mikhail Usenko <...> wrote:
> 1) if you run manpath from the command line in clean Cygwin installation you find out that
> "${HOME}/man" is (and always remains) in your searching path by default even if you have no "${HOME}/man"
> in your home directory path

Amend: In fact "${HOME}/man" is dynamically added/removed to the search path on its creation/deletion.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Does /etc/profile need to set MANPATH?
  2015-07-20 13:43                       ` Mikhail Usenko
  2015-07-20 14:15                         ` Mikhail Usenko
@ 2015-07-20 16:21                         ` Achim Gratz
  1 sibling, 0 replies; 18+ messages in thread
From: Achim Gratz @ 2015-07-20 16:21 UTC (permalink / raw)
  To: cygwin

Mikhail Usenko writes:
> The point is that the current stanza for MANPATH in /etc/skel/.bash_profile
> --- %< ---
> # Set MANPATH so it includes users' private man if it exists
> # if [ -d "${HOME}/man" ]; then
> #   MANPATH="${HOME}/man:${MANPATH}"
> # fi
> --- >8 ---
> is not useful because for:

All occurences of MANPATH have been commented out in both /etc/profile
and the skelton files.  These lines will be removed in the next revision
of base-files.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-07-20 16:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-13 18:57 Does /etc/profile need to set MANPATH? Chris J. Breisch
2014-05-13 19:25 ` Corinna Vinschen
2014-05-14 17:08   ` Achim Gratz
2014-05-15  7:56     ` Corinna Vinschen
2014-05-15 13:18       ` Chris J. Breisch
2014-05-15 13:39         ` Chris J. Breisch
2014-05-15 13:49           ` Corinna Vinschen
2014-05-15 17:48             ` Larry Hall (Cygwin)
2014-05-16 12:14               ` Corinna Vinschen
2014-05-17  8:50                 ` Achim Gratz
2015-07-20 12:09                   ` Mikhail Usenko
2015-07-20 12:20                     ` Michael DePaulo
2015-07-20 13:43                       ` Mikhail Usenko
2015-07-20 14:15                         ` Mikhail Usenko
2015-07-20 16:21                         ` Achim Gratz
2014-05-16 20:00             ` Chris J. Breisch
2014-05-17 20:59             ` Michael Wild
2014-05-19  9:38               ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).