Re: [tz] Ubuntu drops old-style links

2024-03-23 Thread Corinna Vinschen via Cygwin-apps
On Mar 23 10:38, Brian Inglis via Cygwin-apps wrote:
> It looks to me that tzset.c prioritizes the Windows label over the country,
> and it may be a better match prioritizing the country over the label, if the
> country is not 001/"", nor ZZ, which are the generic entries.

The Windows timezone is the relevant setting in the first place becasue
that's what indicvates the actual local time *as the user chose*.
The territory should only be a secondary hint to choose the right
POSIX entry.

For instance, I know people always using UTC, independently of their
territory setting. If the territory rules, this user choice would be
broken in Cygwin.

> It also is not clear what tzset should do when tzmap has a list of zones to
> choose from, for example:
> 
>   { L"Mountain Standard Time", L"CA", L"America/Edmonton
> America/Cambridge_Bay America/Inuvik" },
>   { L"Mountain Standard Time", L"US", L"America/Denver America/Boise" },
>   { L"US Mountain Standard Time", L"CA", L"America/Creston
> America/Dawson_Creek America/Fort_Nelson" },
> 
> it currently just prints the first, but perhaps it should print all relevant
> entries and the caller should handle the alternatives?

tzset is called from the shell default profile.  It has to use exactly
one, valid entry, so time works as desired without forcing interactivity.

If the user doesn't like it, the user can always override tzset's choice
in her own profile.


Corinna


Re: GetVersionEx() depreciated, what should be used instead for Windows 7/8/10?

2024-03-23 Thread Corinna Vinschen via Cygwin
On Mar 23 10:57, Christian Franke via Cygwin wrote:
> On Mar 21 16:15, Corinna Vinschen via Cygwin wrote:
> > On Mar 21 09:58, Christian Franke via Cygwin wrote:
> > > > > ..
> > I just gave it a try on W11. The results are even more funny than I
> > anticipated:
> > 
> > ...
> > 
> > So, yeah, with your observations especially on older W10 versions and
> > with 8.1 doing the same thing, I guess we can safely drop the extra call
> > to RtlGetNtVersionNumbers now.
> 
> Or:
> Keep RtlGetVersionNumbers, compare result with RtlGetVersion and emit debug
> output if both differ. This would allow to diagnose a possible future
> reappearance of the issue.

Good idea! Do you want to create a patch?


Thanks,
Corinna

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


Re: [tz] Ubuntu drops old-style links

2024-03-23 Thread Brian Inglis via Cygwin-apps

On 2024-03-23 10:38, Brian Inglis via Cygwin-apps wrote:

On 2024-03-23 03:54, Corinna Vinschen via Cygwin-apps wrote:

On Mar 22 10:02, Brian Inglis via Cygwin-apps wrote:

On 2024-03-21 03:36, Corinna Vinschen via Cygwin-apps wrote:

We're generating the conversion from Windows to POSIX timezone via
the conversion table from unicode.org:

https://cygwin.com/cgit/newlib-cygwin/tree/winsup/utils/tzmap-from-unicode.org

Plus a few (7, actually) mappings the Unicode consortium missed in
the list (or maybe they are available in the meantime, needs checking).
This is the minimum list of timezone info we need in the tzdata DB.


I generated tzmap.h and generated differences since the last update cldr ~40.
I also searched in the latest for matches for each field attached as first.

I do not know if they will be of help as I see you have already looked at tzmap.

It looks as if the match might better prioritize country code over Windows 
label.


Which match?  I'm not sure what you're trying to tell me.

Basically, we want to generate a POSIX timezone from the current user's
Windows timezone.  This boils down to four questions:

- Is the creation of tzmap.h from unicode.org via the
   tzmap-from-unicode.org script the right thing to do or not?

- If it's the wrong thing to do, what other source do you propose and do
   you have a script to perform the conversion from this source to a
   valid tzmap.h file?

- Otherwise, is the current tzmap-from-unicode.org right or wrong in
   adding these old extra timezone/territory settings, or is even
   some combination missing?

- If so, would you mind to send a patch to fix tzmap-from-unicode.org
   accordingly?


I have a decent background in tzdata, but little in Windows or CLDR, although at 
least information from the latter can be extracted from GitHub.


It looks to me that tzset.c prioritizes the Windows label over the country, and 
it may be a better match prioritizing the country over the label, if the country 
is not 001/"", nor ZZ, which are the generic entries.


It also is not clear what tzset should do when tzmap has a list of zones to 
choose from, for example:


   { L"Mountain Standard Time", L"CA", L"America/Edmonton America/Cambridge_Bay 
America/Inuvik" },

   { L"Mountain Standard Time", L"US", L"America/Denver America/Boise" },
   { L"US Mountain Standard Time", L"CA", L"America/Creston America/Dawson_Creek 
America/Fort_Nelson" },


it currently just prints the first, but perhaps it should print all relevant 
entries and the caller should handle the alternatives?


There also seem to be issues with CLDR data:

 https://postgrespro.com/list/thread-id/2571399

not to mention the delays in updating Windows and CLDR data:

 2021 Samoa DST change in 2024 March/April Windows updates
https://techcommunity.microsoft.com/t5/daylight-saving-time-time-zone/interim-guidance-for-samoa-dst-changes-2021/ba-p/4048965

 Intermittent updates from tzdata and Windows
https://github.com/unicode-org/cldr/commits/main/common/supplemental/windowsZones.xml

plus they no longer seem to be updating the tzdata version in that file since 
2021a.


From the point of view of tzdata, given most zones are required in tzmap for 
tzset to use, we can not reduce much there: see tzmap summary attached.


So the only significant reductions we can make by splitting are with the right 
and posix subtrees, perhaps in two or a single extra package: see zi summary.


--
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érytzmap total extra
pri 1  87/ 91  4 zones src zonenow.tab
pri 2 210/221 11 zones src zone1970.tab 
pri 3 101/132 31 zones src backzone 
pri 4  19/113 94 zones src backward 
pri 5  32/ 41  9 zones src files 
total 449/598149 zones 

1.8M/usr/share/zoneinfo/posix
2.4M/usr/share/zoneinfo/right
2.8M/usr/share/zoneinfo/
6.9Mtotal


Updated: man-pages-linux 6.7

2024-03-23 Thread Cygwin Linux Man Pages Maintainer
The following package has been upgraded in the Cygwin distribution:

* man-pages-linux   6.7

Documents the Linux kernel system calls and C library interfaces used
by programs, plus system and administrative utilities, devices, file
system, file, and data formats, and related information.

For more information, see the project home page:

https://kernel.org/doc/man-pages/

As Cygwin has its own man pages with some conflicts, these man pages are
installed under /usr/share/man/man-pages-linux/, so by default searching
or viewing these pages requires the option:

$ apropos -m|--systems man-pages-linux ...
$ man -m|--systems man-pages-linux ...

Cygwin man pages are under the default system "man", so for convenience
both systems may be specified separated by comma e.g.

$ man -m man,man-pages-linux ...

The path or option may also be added explicitly to a users MANPATH or
alias e.g.

$ export MANPATH=$MANPATH:/usr/share/man/man-pages-linux

$ alias apropos='apropos -m man,man-pages-linux'
$ alias man='man -m man,man-pages-linux'

Add -a to show both Cygwin and Linux (and POSIX if companion package
man-pages-posix is also installed) manual pages.

For convenience and backward compatibility /usr/share/man/linux is
provided as a symlink. 

If you prefer to see Linux man pages over Cygwin man pages, then use
-m|--systems linux in the examples above, or add -m linux to a command.

Release 6 added some section 2 and 3 pages suffixed by const, head,
or type installed in the base section directories.

For recent changes, please see below, or after installation read
/usr/share/doc/man-pages-linux/Changes:


man-pages   6.7 2024-03-19

New and rewritten pages

- man3/
TIMEVAL_TO_TIMESPEC.3

Newly documented interfaces in existing pages

- man2/
process_madvise.2
process_madvise() glibc wrapper

New and changed links

- man3/
TIMESPEC_TO_TIMEVAL.3   (TIMEVAL_TO_TIMESPEC(3))

Global changes

-  Build system
   -  Reorganize build system
   -  Clarify dependencies
   -  Clarify configurable variables
   -  Add 'distcheck' target
   -  Ignore known warnings
   -  Replace uses of man2html(1) by grohtml(1)

Changes to individual pages

- The manual pages (and other files in the repository) have been
  improved beyond what this changelog covers. To learn more about
  changes applied to individual pages, or the authors of changes,
  use git(1).

-- 
  *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

The easiest way to unsubscribe is to visit 
, and click 'Unsubscribe'.

If you need more information on unsubscribing, start reading here: 
.



Re: [tz] Ubuntu drops old-style links

2024-03-23 Thread Brian Inglis via Cygwin-apps

On 2024-03-23 03:54, Corinna Vinschen via Cygwin-apps wrote:

On Mar 22 10:02, Brian Inglis via Cygwin-apps wrote:

On 2024-03-21 03:36, Corinna Vinschen via Cygwin-apps wrote:

We're generating the conversion from Windows to POSIX timezone via
the conversion table from unicode.org:

https://cygwin.com/cgit/newlib-cygwin/tree/winsup/utils/tzmap-from-unicode.org

Plus a few (7, actually) mappings the Unicode consortium missed in
the list (or maybe they are available in the meantime, needs checking).
This is the minimum list of timezone info we need in the tzdata DB.


I generated tzmap.h and generated differences since the last update cldr ~40.
I also searched in the latest for matches for each field attached as first.

I do not know if they will be of help as I see you have already looked at tzmap.

It looks as if the match might better prioritize country code over Windows 
label.


Which match?  I'm not sure what you're trying to tell me.

Basically, we want to generate a POSIX timezone from the current user's
Windows timezone.  This boils down to four questions:

- Is the creation of tzmap.h from unicode.org via the
   tzmap-from-unicode.org script the right thing to do or not?

- If it's the wrong thing to do, what other source do you propose and do
   you have a script to perform the conversion from this source to a
   valid tzmap.h file?

- Otherwise, is the current tzmap-from-unicode.org right or wrong in
   adding these old extra timezone/territory settings, or is even
   some combination missing?

- If so, would you mind to send a patch to fix tzmap-from-unicode.org
   accordingly?


I have a decent background in tzdata, but little in Windows or CLDR, although at 
least information from the latter can be extracted from GitHub.


It looks to me that tzset.c prioritizes the Windows label over the country, and 
it may be a better match prioritizing the country over the label, if the country 
is not 001/"", nor ZZ, which are the generic entries.


It also is not clear what tzset should do when tzmap has a list of zones to 
choose from, for example:


  { L"Mountain Standard Time", L"CA", L"America/Edmonton America/Cambridge_Bay 
America/Inuvik" },

  { L"Mountain Standard Time", L"US", L"America/Denver America/Boise" },
  { L"US Mountain Standard Time", L"CA", L"America/Creston America/Dawson_Creek 
America/Fort_Nelson" },


it currently just prints the first, but perhaps it should print all relevant 
entries and the caller should handle the alternatives?


There also seem to be issues with CLDR data:

https://postgrespro.com/list/thread-id/2571399

not to mention the delays in updating Windows and CLDR data:

2021 Samoa DST change in 2024 March/April Windows updates
https://techcommunity.microsoft.com/t5/daylight-saving-time-time-zone/interim-guidance-for-samoa-dst-changes-2021/ba-p/4048965

Intermittent updates from tzdata and Windows
https://github.com/unicode-org/cldr/commits/main/common/supplemental/windowsZones.xml

plus they no longer seem to be updating the tzdata version in that file since 
2021a.


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


Re: Help with use of pgrep or pkill commands with full name options

2024-03-23 Thread Henry S. Thompson via Cygwin
J M via Cygwin writes:

> Help with use of pgrep or pkill commands with full name options.
>
> I trying to use pgrep or pkill utility commands to find processes but using
> the full path names, by example, find /usr/bin/bash (package procps-ng):
>
> Then, if I use pgrep -f /usr/bin/bash, don't find nothing.

I note that on Cygwin:

  pgrep -f /bin/bash

finds some but not all of my running bash processes.

  pgrep -a bash

finds all of them.

I leave it to others to explain why /usr/bin/bash doesn't work.

I note that on (Debian) Linux the results of the above alternatives
_also_ differ, but that pgrep -f /usr/bin/bash and pgrep -f /bin/bash
both work and give the same results.

ht
-- 
   Henry S. Thompson, School of Informatics, University of Edinburgh
10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND
   e-mail: h...@inf.ed.ac.uk
  URL: https://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

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


Re: GetVersionEx() depreciated, what should be used instead for Windows 7/8/10?

2024-03-23 Thread Christian Franke via Cygwin

On Mar 21 16:15, Corinna Vinschen via Cygwin wrote:

On Mar 21 09:58, Christian Franke via Cygwin wrote:

..

I just gave it a try on W11. The results are even more funny than I
anticipated:

...

So, yeah, with your observations especially on older W10 versions and
with 8.1 doing the same thing, I guess we can safely drop the extra call
to RtlGetNtVersionNumbers now.


Or:
Keep RtlGetVersionNumbers, compare result with RtlGetVersion and emit 
debug output if both differ. This would allow to diagnose a possible 
future reappearance of the issue.




   After such a long time, I don't know
on which version of Windows we observed the problem.


Some developer preview?

Meantime I also tested with Win10 1607, 1703, 1709, 1803 VM snapshots 
with same result.


--
Regards,
Christian


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


Re: [tz] Ubuntu drops old-style links

2024-03-23 Thread Corinna Vinschen via Cygwin-apps
On Mar 22 10:02, Brian Inglis via Cygwin-apps wrote:
> On 2024-03-21 03:36, Corinna Vinschen via Cygwin-apps wrote:
> > We're generating the conversion from Windows to POSIX timezone via
> > the conversion table from unicode.org:
> > 
> > https://cygwin.com/cgit/newlib-cygwin/tree/winsup/utils/tzmap-from-unicode.org
> > 
> > Plus a few (7, actually) mappings the Unicode consortium missed in
> > the list (or maybe they are available in the meantime, needs checking).
> > This is the minimum list of timezone info we need in the tzdata DB.
> 
> I generated tzmap.h and generated differences since the last update cldr ~40.
> I also searched in the latest for matches for each field attached as first.
> 
> I do not know if they will be of help as I see you have already looked at 
> tzmap.
> 
> It looks as if the match might better prioritize country code over Windows 
> label.

Which match?  I'm not sure what you're trying to tell me.

Basically, we want to generate a POSIX timezone from the current user's
Windows timezone.  This boils down to four questions:

- Is the creation of tzmap.h from unicode.org via the
  tzmap-from-unicode.org script the right thing to do or not?

- If it's the wrong thing to do, what other source do you propose and do
  you have a script to perform the conversion from this source to a
  valid tzmap.h file?

- Otherwise, is the current tzmap-from-unicode.org right or wrong in
  adding these old extra timezone/territory settings, or is even
  some combination missing?

- If so, would you mind to send a patch to fix tzmap-from-unicode.org
  accordingly?


Corinna


Re: GetVersionEx() depreciated, what should be used instead for Windows 7/8/10?

2024-03-23 Thread Corinna Vinschen via Cygwin
On Mar 22 18:13, Ray Satiro via Cygwin wrote:
> On 3/21/2024 11:15 AM, Corinna Vinschen via Cygwin wrote:
> >https://cygwin.com/cgit/newlib-cygwin/commit/?id=48511f3d3847c
> 
> The code in that commit doesn't look right. RtlGetNtVersionNumbers is a void
> function

The code doesn't request a return value.

> and the third parameter may not be just the build number.

Fixed a month later:
https://cygwin.com/cgit/newlib-cygwin/commit/?id=63f19278b998b


Corinna

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