public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* man-pages-linux needs case sensitive directories
@ 2023-02-15  7:11 Brian Inglis
  2023-02-15  9:22 ` Corinna Vinschen
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Inglis @ 2023-02-15  7:11 UTC (permalink / raw)
  To: cygwin-apps

Hi folks,

Linux man pages 6.03 has been released.
I realized that some of the man pages are case sensitive e.g. _[Ee]xit.2, 
{NAN,nan}.3, perhaps others.
I took care of my own system using commands like below, but would appreciate 
advice on whether there is any better portable or Cygwin specific approach, and 
what are the opinions on the best way to handle this in the cygport for download 
and install?
Is this supported by Cygwin on Windows 10 versions >= [20]18-03 with the 
directory attribute set, are there likely to be any problems with git, or in 
general with POSIX<->Windows file names?

$ cd /usr/share/man/linux/
$ for s in man?; do fsutil file setCaseSensitiveInfo $s; done
Case sensitive attribute on directory ...\usr\share\man\linux\man1 is enabled.
Case sensitive attribute on directory ...\usr\share\man\linux\man2 is enabled.
Case sensitive attribute on directory ...\usr\share\man\linux\man3 is enabled.
Case sensitive attribute on directory ...\usr\share\man\linux\man4 is enabled.
Case sensitive attribute on directory ...\usr\share\man\linux\man5 is enabled.
Case sensitive attribute on directory ...\usr\share\man\linux\man6 is enabled.
Case sensitive attribute on directory ...\usr\share\man\linux\man7 is enabled.
Case sensitive attribute on directory ...\usr\share\man\linux\man8 is enabled.

-- 
Take care. Thanks, Brian Inglis			Calgary, Alberta, Canada

La perfection est atteinte			Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter	not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer	but when there is no more to cut
			-- Antoine de Saint-Exupéry

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

* Re: man-pages-linux needs case sensitive directories
  2023-02-15  7:11 man-pages-linux needs case sensitive directories Brian Inglis
@ 2023-02-15  9:22 ` Corinna Vinschen
  2023-02-16  5:55   ` Brian Inglis
  0 siblings, 1 reply; 3+ messages in thread
From: Corinna Vinschen @ 2023-02-15  9:22 UTC (permalink / raw)
  To: cygwin-apps

On Feb 15 00:11, Brian Inglis via Cygwin-apps wrote:
> Hi folks,
> 
> Linux man pages 6.03 has been released.
> I realized that some of the man pages are case sensitive e.g. _[Ee]xit.2,
> {NAN,nan}.3, perhaps others.
> I took care of my own system using commands like below, but would appreciate
> advice on whether there is any better portable or Cygwin specific approach,
> and what are the opinions on the best way to handle this in the cygport for
> download and install?
> Is this supported by Cygwin on Windows 10 versions >= [20]18-03 with the
> directory attribute set, are there likely to be any problems with git, or in
> general with POSIX<->Windows file names?
> 
> $ cd /usr/share/man/linux/
> $ for s in man?; do fsutil file setCaseSensitiveInfo $s; done

You can do this in Cygwin with the chattr(1) tool, see chattr --help.
The hint "WSL must be installed" appears to be outdated, at least on
Windows 11.  There are two approaches for case-sensitivity, see

  https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive

  https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitivedirs

However, as part of the distro, the package must not rely on
case-sensitivity.  We have to assume that most users are using Windows
in default settings.  And we still support Windows versions prior to
Windows 10 1803.  But even then, I encountered serious trouble with
case-sensitive directories on remote shares, see

  https://github.com/microsoft/WSL/issues/3885

so you'd get into trouble if the Cygwin installation is on a share.

For colliding man pages, what you can do is to append a character to
the man page file, so you can install both.  For instance:

  exit.2
  Exit.2a

  nan.3
  NAN.3a

Kind of like that.


Corinna

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

* Re: man-pages-linux needs case sensitive directories
  2023-02-15  9:22 ` Corinna Vinschen
@ 2023-02-16  5:55   ` Brian Inglis
  0 siblings, 0 replies; 3+ messages in thread
From: Brian Inglis @ 2023-02-16  5:55 UTC (permalink / raw)
  To: cygwin-apps

On 2023-02-15 02:22, Corinna Vinschen wrote:
> On Feb 15 00:11, Brian Inglis wrote:
>> Linux man pages 6.03 has been released.
>> I realized that some of the man pages are case sensitive e.g. _[Ee]xit.2,
>> {NAN,nan}.3, perhaps others.
>> I took care of my own system using commands like below, but would appreciate
>> advice on whether there is any better portable or Cygwin specific approach,
>> and what are the opinions on the best way to handle this in the cygport for
>> download and install?
>> Is this supported by Cygwin on Windows 10 versions >= [20]18-03 with the
>> directory attribute set, are there likely to be any problems with git, or in
>> general with POSIX<->Windows file names?
>> $ cd /usr/share/man/linux/
>> $ for s in man?; do fsutil file setCaseSensitiveInfo $s; done

> You can do this in Cygwin with the chattr(1) tool, see chattr --help.

Thanks Corinna,

I thought I remembered something but git and ml searches got no useful hits.

> The hint "WSL must be installed" appears to be outdated, at least on
> Windows 11.  There are two approaches for case-sensitivity, see
>    https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive
>    https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitivedirs
> However, as part of the distro, the package must not rely on
> case-sensitivity.  We have to assume that most users are using Windows
> in default settings.  And we still support Windows versions prior to
> Windows 10 1803.  But even then, I encountered serious trouble with
> case-sensitive directories on remote shares, see
>    https://github.com/microsoft/WSL/issues/3885
> so you'd get into trouble if the Cygwin installation is on a share.

I noticed that and other issues, like needing to pre-create and fsutil/chattr 
the directories before extraction.

> For colliding man pages, what you can do is to append a character to
> the man page file, so you can install both.  For instance:
>    exit.2
>    Exit.2a
>    nan.3
>    NAN.3a
> Kind of like that.

Thanks much for that great idea!
I will check if it will extract with:

TAR_OPTIONS="--transform=s,_Exit.2,_Exit.2u, --transform=s,NAN.3,NAN.3u, 
--show-transform-names"

as those 2 files are small .so to man2/_exit.2 and man3/INFINITY.3 respectively, 
and note suffix "u" to make Uppercase Unique and deal with case conflicts.

I have also noticed that man -m, --system=a,b priority is alphabetic, so 
-mman,linux displays Linux instead of Cygwin man pages, so will use 
man-pages-linux instead, and provide linux as a convenient interactive symlink 
for backward compatibility, and if anyone wants to see Linux over Cygwin.

-- 
Take care. Thanks, Brian Inglis			Calgary, Alberta, Canada

La perfection est atteinte			Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter	not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer	but when there is no more to cut
			-- Antoine de Saint-Exupéry

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

end of thread, other threads:[~2023-02-16  5:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-15  7:11 man-pages-linux needs case sensitive directories Brian Inglis
2023-02-15  9:22 ` Corinna Vinschen
2023-02-16  5:55   ` Brian Inglis

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).