Re: [PATCH 0/7] cygcheck-dep updates

2023-10-30 Thread Mikhail Usenko via Cygwin-apps

>Пятница, 27 октября 2023, 22:45 +03:00 от Brian Inglis via Cygwin-apps 
>:
> 
>Brian Inglis (7):
>   support better compressed setup.xz instead of bz2
>   fix no version for -C if only test release available
>   make cygcheck-dep executable
>   add /etc/{postinstall,preremove}/cygcheck-dep.sh
>   rename cygcheck-dep.sh to etc-preremove-cygcheck-dep.sh
>   add postinstall script to create cache dir
>   minimize cache dir preremove script
>
>  cygcheck-dep | 27 +++
>  etc-postinstall-cygcheck-dep.sh | 1 +
>  etc-preremove-cygcheck-dep.sh | 1 +
>  3 files changed, 17 insertions(+), 12 deletions(-)
>  mode change 100644 => 100755 cygcheck-dep
>  create mode 100755 etc-postinstall-cygcheck-dep.sh
>  create mode 100755 etc-preremove-cygcheck-dep.sh
>
>--
>2.39.0
 
Brian, thank you for the cool solution to the issue when a package has only a 
test version!
 
--
 

Re: Circular dependency with mingw64-x86_64-runtime

2018-05-02 Thread Mikhail Usenko via cygwin
> On May 2, 2018, at 10:22 AM, Mikhail Usenko wrote:
> 
> On Sun, 29 Apr 2018 19:16:17 -0700 (PDT)
> Steven Penny <...> wrote:
>> so "mingw64-x86_64-gcc-core" and "mingw64-x86_64-runtime" require each other
> 
> By the way this is not the only package group with circular dependencies.
> There are more in Cygwin distribution, that can be observed with cygcheck-dep:
> …


> On May 2, 2018, at 5:46 AM, JonY <10wa...@gmail.com> wrote:
> 
> …
> 
> That is not a problem affecting Cygwin.


So what? )
It was just a curiosity.
-- 


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



Re: Circular dependency with mingw64-x86_64-runtime

2018-05-02 Thread Mikhail Usenko via cygwin
On Sun, 29 Apr 2018 19:16:17 -0700 (PDT)
Steven Penny <...> wrote:
> so "mingw64-x86_64-gcc-core" and "mingw64-x86_64-runtime" require each other

By the way this is not the only package group with circular dependencies.
There are more in Cygwin distribution, that can be observed with cygcheck-dep:
$ cygcheck-dep -cSIO
 ( at-spi2-core libatspi0 )
 ( bash coreutils tzcode )
 ( biber texlive-collection-bibtexextra )
 ( cygwin-debuginfo )
 ( desktop-file-utils gamin libfam0 libglib2.0_0 shared-mime-info )
 ( evolution-data-server libebackend1.2_10 libebook-contacts1.2_2 
libebook1.2_16 libecal1.2_19 libedata-book1.2_25 libedata-cal1.2_28 
libedataserver1.2_21 )
 ( gconf-desktop-schemas GConf2 libgconf2_4 )
 ( girepository-GstCheck1.0 libgstreamer1.0-devel )
 ( gnome-online-accounts libgoa-backend1.0_1 libgoa1.0_0 )
 ( libaqbanking35 libaqebics0 libaqhbci24 libaqofxconnect7 libaqpaypal0 )
 ( libautotrace3 libMagickC++6_8 libMagickCore6_5 libMagickWand6_5 libpstoedit0 
)
 ( libdbi-drivers libdbi1 )
 ( libfm4 libmenu-cache3 menu-cache )
 ( libmailutils-sieve-extensions libmailutils5 )
 ( libopenldap2_4_2 libsasl2_3 )
 ( libopenmpi12 openmpi )
 ( libupower-glib1 upower )
 ( mingw64-i686-gcc-core mingw64-i686-runtime )
 ( mingw64-x86_64-gcc-core mingw64-x86_64-runtime )
 ( php-Archive_Tar php-Console_Getopt php-PEAR php-Structures_Graph 
php-XML_Util )
 ( python2-incremental python2-twisted )
 ( python2-sphinx python2-sphinxcontrib-websupport )
 ( python3-incremental python3-twisted )
 ( python3-sphinx python3-sphinxcontrib-websupport )
 ( python-docutils python-pygments python-sphinx )
 ( ruby ruby-io-console ruby-psych ruby-rake ruby-rdoc rubygems )
 ( tesseract-ocr tesseract-ocr-eng )
 ( tesseract-training-core tesseract-training-util )
 ( texlive texlive-collection-basic )
 ( xf86-video-dummy xf86-video-nested xorg-server )

And with replacements for obsolete packages being taken into account 
(cygcheck-dep -cSI)
there is also libfm-qt3 which turns out to be depended on itself.


-- 


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



[ANNOUNCEMENT] cygcheck-dep-3.0-2

2018-04-09 Thread Mikhail Usenko via cygwin
Version 3.0-2 of cygcheck-dep has been uploaded.

cygcheck-dep is a bash script for displaying information on dependencies
for installed Cygwin packages. For example: the information about package
leaves; packages with broken dependencies; obsolete, and orphaned packages;
particular package's dependencies; unused dependencies that can be removed
along with particular package meant for uninstalling. See --help for more
description.

It can be useful if you are using some Cygwin software, and want to
keep the Cygwin installation directory clean from unused packages.


Changelog since version 2.1-1:
  * the script is almost completely rewritten to reflect the changes
in setup.exe functioning and for clean code;
  * the legacy code for support of Cygwin Ports collection is dropped;
  * there are new command options.

--

   *** CYGWIN-ANNOUNCE UNSUBSCRIBE INFO ***

 If you want to unsubscribe from the cygwin-announce mailing list,
 look at the "List-Unsubscribe: " tag in the email header of this message.
 Send email to the address specified there. It will be in the format:

   cygwin-announce-unsubscribe-you=yourdomain.com  cygwin.com

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

   http://sourceware.org/lists.html#unsubscribe-simple

 Please read *all* of the information on unsubscribing
 that is available starting at this URL.

-- 

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



upload cygcheck-dep to noarch directory

2018-04-09 Thread Mikhail Usenko via cygwin-apps

Please, move cygcheck-dep to noarch/release hierarchy, so that the new version
can be uploaded appropriately.
-- 



Re: Quotes around command-line argument that has unicode characters are not removed

2018-03-22 Thread Mikhail Usenko via cygwin
On Thu, 22 Mar 2018 01:15:00 +0100
Dmitry Katsubo via cygwin <...> wrote:

> Dear Cygwin community,
> 
> I observe the following on my Cygwin: when I put quotes around file that has
> non-ASCII symbols, these quotes are passed to argv of the process literally,
> otherwise they are removed. I would expect that there is a consistency.
> 
> I have written a small C program that displays arguments, and run it three
> times:
> 
> #1 For the file with space, taken into quotes ("the file.txt") -- OK
> #2 For the file with non-ASCII characters (Château.txt) -- OK
> #3 For the file with non-ASCII characters, taken into quotes ("Château.txt") 
> -- WRONG
> 
> d:\cli> uname -a
> CYGWIN_NT-6.1-WOW PC 2.9.0(0.318/5/3) 2017-09-12 10:41 i686 Cygwin
> 
> D:\cli> chcp
> Active code page: 866
> 
> D:\cli> dir
> ...cut...
> 2018-03-22  00:43 0 Château.txt
> 2018-03-22  00:01   393 test.c
> 2018-03-22  00:01   150,230 test.exe
> 2018-03-21  00:15   186 test.pl
> 2018-03-22  00:43 0 the file.txt
> 2018-03-22  00:4016 текст плюс.txt
>6 File(s)150,825 bytes
>2 Dir(s)  41,972,293,632 bytes free
> 
> D:\cli> test "the file.txt"
> param 0 = test
> param 1 = the file.txt
> File 'the file.txt' was opened
> 
> D:\cli> test Château.txt
> param 0 = test
> param 1 = Château.txt
> File 'Château.txt' was opened
> 
> D:\cli> test "Château.txt"
> param 0 = test
> param 1 = "Château.txt"
> Failed to open '"Château.txt"': No such file or directory
> 
> As one can see, the last run fails. I am a bit puzzled: how can I pass the 
> name
> of the file with space and Unicode symbols? I need to do it in uniform way, 
> as I
> am calling a Cygwin program from native Windows program, as in [1].
> 
> D:\cli> test "текст плюс.txt"
> param 0 = test
> param 1 = "текст плюс.txt"
> Failed to open '"текст плюс.txt"': No such file or directory
> 
> I have search a bit, but I couldn't find a direct answer. From post [1] and 
> [2]
> I see that compiler inserts the code to do some argument pre-processing like
> @pathnames [3], but what are exactly the rules? Is quote pre-processing done 
> in
> dcrt0.cc:177 [4]?
> 
> Any feedback is appreciated.
> 
> [1] https://sourceware.org/ml/cygwin/2016-05/msg00082.html
> [2] http://daviddeley.com/autohotkey/parameters/parameters.htm
> [3] https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-at
> [4] https://github.com/openunix/cygwin/blob/master/winsup/cygwin/dcrt0.cc#L177
> 
> === test.c ===
> #include 
> #include 
> #include 
> 
> int main(int argc, char* argv[])
> {
>   for (int i = 0; i < argc; i++)
>   {
>   printf("param %d = %s\n", i, argv[i]);
>   }
>   FILE* f = fopen(argv[1], "r");
>   if (f != NULL)
>   {
>   printf("File '%s' was opened\n", argv[1]);
>   fclose(f);
>   } else {
>   printf("Failed to open '%s': %s\n", argv[1], strerror(errno));
>   }
>   return 0;
> }
> 
> -- 

Hello, Dmintry,
consider these test cases:

Native (msvcrt) binary:
---
$ x86_64-w64-mingw32-gcc test.c -o test-win.exe
$ ldd test-win.exe
ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x7fa0590)
KERNEL32.DLL => /cygdrive/c/Windows/system32/KERNEL32.DLL 
(0x7fa030e)
KERNELBASE.dll => /cygdrive/c/Windows/system32/KERNELBASE.dll 
(0x7fa028f)
msvcrt.dll => /cygdrive/c/Windows/system32/msvcrt.dll (0x7fa0322)
---

Cygwin-flavor binary:
-
$ gcc test.c -o test-cygwin.exe
$ ldd test-cygwin.exe
ntdll.dll => /cygdrive/c/Windows/SYSTEM32/ntdll.dll (0x7fa0590)
KERNEL32.DLL => /cygdrive/c/Windows/system32/KERNEL32.DLL 
(0x7fa030e)
KERNELBASE.dll => /cygdrive/c/Windows/system32/KERNELBASE.dll 
(0x7fa028f)
cygwin1.dll => /usr/bin/cygwin1.dll (0x18004)
-

Create a file with non-ascii chars in the name:
---
$ touch "текст плюс.txt"
---

Run both binaries in mintty with bash:
--
$ ./test-win "текст плюс.txt"
param 0 = D:\wroot\test.cygwin\Quotes around command-line argument that has 
unicode characters are not removed\test-win.exe
param 1 = ▒ .txt
File '▒ .txt' was opened
$ ./test-cygwin "текст плюс.txt"
param 0 = ./test-cygwin
param 1 = текст плюс.txt
File 'текст плюс.txt' was opened
--

Run the binaries in cmd.exe with bash:
--
$ ./test-win "текст плюс.txt"
param 0 = D:\wroot\test.cygwin\Quotes around command-line argument that has 
unicode characters are not removed\test-win.exe
param 1 = ЄхъёЄ яы■ё.txt
File 'ЄхъёЄ яы■ё.txt' was opened
$ ./test-cygwin "текст плюс.txt"
param 0 = ./test-cygwin
param 1 = текст плюс.txt
File 'текст плюс.txt' was opened

Re: cygcheck-dep and _obsolete packages

2018-03-16 Thread Mikhail Usenko via cygwin
On Thu, 15 Mar 2018 23:40:55 +
Jon Turney <...> wrote:

> Just to be clear, the category is irrelevant here, it's the fact that 
> xorgproto obsoletes these packages that is significant.
> 

OK.


-- 


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



Re: cygcheck-dep and _obsolete packages

2018-03-15 Thread Mikhail Usenko via cygwin
On Wed, 28 Feb 2018 22:57:05 +0100
Marco Atzeri <...> wrote:

> Hi Mikhail,
> 
> as latest setup skips the installation of _obsolete packages
> can you adjust the behaviour of cygcheck-dep to ignore
> the false warning ?
> 
> /usr/bin/cygcheck-dep: WARNING: broken dependencies:
> /usr/bin/cygcheck-dep:   installed package 'cygwin/xorg-server-devel'
> /usr/bin/cygcheck-dep:   depends on the following required packages that are
> /usr/bin/cygcheck-dep:   not installed; these dependencies will be discarded
> /usr/bin/cygcheck-dep: ( fontsproto inputproto kbproto presentproto 
> randrproto renderproto resourceproto scrnsaverproto xextproto 
> xf86bigfontproto xineramaproto xproto )
> 

Hello, Marco
I will change the script (along with dropping cygwinports support).
At present cygcheck-dep prints out exactly what setup.ini claims about
what the package is requiring, and as per I have understood, now setup.exe
does not install requisites from the _obsolete category, using instead
the packages by which they are obsoleted.

-- 


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



Re: [bug] coreutils: potentially dangerous: $(realpath //) != /

2018-03-14 Thread Mikhail Usenko via cygwin
On Mon, 12 Mar 2018 20:43:13 -0500
Eric Blake <...> wrote:

> Furthermore, you need to realize that GNU coreutils 'rm' already has 
> special logic (permitted by POSIX) such that 'rm -rf /' fails unless you 
> use --no-preserve-root ('rm -rf /*' unfortunately does not trigger the 
> special logic, only an attempt to directly remove the root directory is 
> flagged - but you're also forgetting that /* does not necessarily list 
> all files under /, thanks to hidden files, and that 'rm -rf "$dir"' is 
> always better than 'rm -rf "$dir"/*' if you are worried about hidden 
> files in $dir and/or command-line length limits due to the glob 
> expansion of *).
> 
I don't know what this is for, but nevertheless,
thank you for your efforts to eliminate of illiteracy among readers...

> Just because Linux has taken the stance that their documented definition 
> of // is "synonym for /" does NOT mean that ALL POSIX systems have taken 
> the same approach; Cygwin has taken the approach that "// is documented 
> to be the root of network access points, distinct from /".
> 
> POSIX allows leeway between implementations; this is one of those 
> documented places where they differ, yet are still both POSIX compliant 
> with their different choices.  If your script is not robust to what 
> POSIX has already warned you about, fix your script.
> 
> > and, as a consequence, I should avoid the case where
> > somewhere in a bash script evaluating of some variable would lead to one of
> > the following command to execute:
> > rm -rf /*
> > rm -rf //*
> > rm -rf ///*
> > rm -rf *
> > that all do the very same thing in Linux.
> 
> 3 of the 4 do the same thing on ALL POSIX platforms.  The only one that 
> has implementation-defined behavior is 'rm -rf //*', which is different 
> on systems where // is distinct (such as Cygwin).  All the other 
> spellings (attempt) to remove all non-hidden files from the root directory.
> 
If you really claims that Cygwin may and should be different and distinct from 
all other
existing POSIX systems (the more so that it is allowed by POSIX),
then it would probably be more obvious and clear to say this at the very 
begining, e.g.
"Get that Linux feeling (with all those differents and distinctions) - on 
Windows"

> Use of // in Linux is already on shaky ground, given that POSIX has 
> already declared it to be implementation-defined.
Shaky ground? There must be some good reasons (beyond the declaration of such 
an abstarct
possibility) that it should to be done differently than it has been so far.


-- 

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



Re: [bug] coreutils: potentially dangerous: $(realpath //) != /

2018-03-12 Thread Mikhail Usenko via cygwin
On Mon, 12 Mar 2018 21:47:09 +0100
Achim Gratz <...> wrote:
> This goes to show that you really, really, really want to understand the 
> corner
> cases in this script.

On Mon, 12 Mar 2018 15:41:00 -0500
Eric Blake <...> wrote:
> On cygwin, '/' and '//' are two different directories, as allowed by 
> POSIX. Converting // into / is a violation of the POSIX requirements on 
> pathname resolution on systems where // is distinct from /.
> ...
> If you want to guarantee that an arbitrary variable concatenated 
> with / and then a glob expands into the expected directory, then YOU 
> have to prefilter the arbitrary variable to make sure it does not 
> consist solely of slashes. 

Well, guys my expextations are that the program/script execution conditions
in Cygwin should be the same as in other popular POSIX systems
(namely it is Linux) and, as a consequence, I should avoid the case where
somewhere in a bash script evaluating of some variable would lead to one of
the following command to execute:
rm -rf /*
rm -rf //*
rm -rf ///*
rm -rf *
that all do the very same thing in Linux.

If at some time it was considered that
$ ls //Server/Folder
in Cygwin should behave like
> net view \\Server\Folder
in Windows to be able to view network shares, I belive this could be realized
with using of some special folder e.g. /cygnetwork, like /cygdrive does it for
Windows drives.
Supporting of UNC paths that are actually off the POSIX unified tree, directly
for POSIX user commands, breaks consistency with Linux user environment, which
is the feature of Cygwin that is highly valued by the most of the users.



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



[bug] coreutils: potentially dangerous: $(realpath //) != /

2018-03-12 Thread Mikhail Usenko via cygwin
coreutils-8.26-2
cygwin-2.10.0-1

Test case 1:
---
$ realpath //
//
---
Expected output: /

Test case 2:
---
$ MYDIR=//
$ test "$(realpath -e "$MYDIR" )" != /  &&  echo rm -rf "$MYDIR"/*
rm -rf ///bin ///cygdrive ///Cygwin.bat ///Cygwin.ico ///Cygwin-Terminal.ico 
///dev ///etc ///home ///lib ///proc ///sbin ///tmp ///usr ///var
---
Expected output: no output


-- 


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