Re: Automatically populate resolv.conf when new DNS is acquired

2018-06-27 Thread john doe

Good morning  Brian, bottom posting.

On 6/26/2018 4:18 PM, Brian Inglis wrote:

On 2018-06-26 04:33, john doe wrote:

In gnupg2 the use of dirmngr utility is required to interact with a keyserver.
Dirmngr requires that '/etc/resolv.conf' be populated with my name servers.
That means that everytime the dns changes (new network ...) I need to manually
edit that file.
How can I let Cygwin update that file whenever the DNS is changed?


Attached an awk script to generate resolv.conf from Windows ipconfig /all
output, run from .cygwin_profile (sourced under Cygwin from login .bash_profile)
using the stanza below: it only replaces an existing writable /etc/resolv.conf
when the content changes - touch, chown, chmod /etc/resolv.conf to enable.

# update /etc/resolv.conf if changed
c=/etc/resolv.conf
test -w $c  && \
i=$(/usr/bin/which -- ipconfig) && \
r=$(/usr/bin/which -- resolv.awk)   && \
t=$(/bin/mktemp -t -- resolv.conf.$$.)  && \
if $i /all | $r  >  $t; then
 /usr/bin/cmp -s -- $t $c   || \
 /bin/cp -fv -- $t $c
 /bin/rm -f -- $t
fi

unset c i r t

This could be used in a bash script run from a Windows scheduled task when a
relevant DHCP event occurs: you can find DHCP events by checking Windows Admin
Tools/Event Viewer/Window Logs/System/Filter Current Log/Event
Sources/Dhcp-Client,DHCPv6-Client, or a similar PowerShell script.



Thanks for the awk script and the explanation on how to use it! :)

By Windows Admin you mean "Windows Admin Center"?
I'm using Cygwin on a laptop (win 7 pro) and sadly, if I'm not 
mistaking, "Windows Admin" is not available on non-server platform.


If I can't find a way to determine when my DNS changes I can clearly 
emulate an hourly cron job by using "task scheduler".


Many thanks for the task scheduler hint and for your help.

--
John Doe

--
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: Autamatically populate resolv.conf when new DNS is acquired

2018-06-27 Thread john doe

On 6/27/2018 9:45 AM, Andrey Repin wrote:

Greetings, john doe!


In gnupg2 the use of dirmngr utility is required to interact with a
keyserver.



Dirmngr requires that '/etc/resolv.conf' be populated with my name servers.


Looks like an upstream bug. /etc/resolv.conf is not a required file for DNS
resolution.



Yes, I have also contacted the dirmngr developer regarding that issue.
But I have to find a work around in the meantime! :)

--
John Doe

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



Autamatically populate resolv.conf when new DNS is acquired

2018-06-26 Thread john doe

Hi,

In gnupg2 the use of dirmngr utility is required to interact with a 
keyserver.


Dirmngr requires that '/etc/resolv.conf' be populated with my name servers.
That means that everytime the dns changes (new network ...) I need to 
manually edit that file.


How can I let Cygwin update that file whenever the DNS is changed?

--
John Doe

--
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: Issue running PowerShell code on Windows Machine from Linux machine using Cygwin

2018-07-30 Thread john doe

On 7/30/2018 1:20 PM, Shekhar Shukla wrote:

  Hi Team,

I am having issue while establishing a ssh connection from Linux to Windows
machine using Cygwin. My powershell script works when I run it from Linux
using ssh connection(Cygwin) to Windows  and manually enter my passowrd.
But whn I use public key to authenticate my user(making a password less
connection), it fails. Is it a bug with CYgwin?

Below is the step by step explantion-


1. Sample
Code
I have put on Windows machine. This machine has Cygwin installed on it

+
:
+++

echo "Hello World!"
import-module ActiveDirectory
get-adcomputer -Filter * |select Name|select -first 10
+


2. When I run
this code
  from Linux machine using Cygwin WITHOUT enabling password-less connection,
It asks for password
of Windows machine and after entering the password it
  execute
s
  like a charm. See below-

+++

shekhar@LinuxBox:~$ ssh shek...@windowsbox.doamin.com 'powershell
"C:/scripts/abc.ps1"'
shek...@windoxbox.domain.com's password:

Hello World!

Name

Server1
Server2
Server3
Server4



3. Now I generate an ssh-key on Linux for user shekhar and copy it on
Windows machine to make a password less connection.

++

shekhar@LinuxBox:~$ ssh-copy-id shek...@windowsbox.doamin.com
shekhar@WindowsBox's password:
Now try logging into the machine, with "ssh 'shek...@windowsbox.domain.com'",
and check in:

   .ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.



4. Now I run the same script again. Now it doesn't asks a password makes a
connection with Windows box and display Hello world(first line of code) but
fails on the second line

+++

shekhar@LinuxBox:~$ ssh shek...@windoxbox.domain.com  'powershell
"C:/scripts/abc.ps1"'
Hello World!
WARNING: Error initializing default drive: 'Unable to contact the server.
This
may be because this server does not exist, it is currently down, or it does
not
  have the Active Directory Web Services running.'.
Get-ADComputer : Unable to contact the server. This may be because this
server
does not exist, it is currently down, or it does not have the Active
Directory
Web Services running.
At C:\scripts\abc.ps1:3 char:15
+ get-adcomputer <<<<  -Filter * |select Name|select -first 10
 + CategoryInfo  : ResourceUnavailable: (:) [Get-ADComputer],
ADSer
verDownException
 + FullyQualifiedErrorId : Unable to contact the server. This may be
becaus
e this server does not exist, it is currently down, or it does not have
th
   e Active Directory Web Services running.,Microsoft.ActiveDirectory.Managem
  ent.Commands.GetADComputer
++



In ~/.ssh/authorized_keys you could try those options:

NO-PTY,NO-USER-RC ssh

EG: authorized_keys:
NO-PTY,NO-USER-RC ssh ...

https://www.ssh.com/ssh/authorized_keys/openssh

--
John Doe

--
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: git-email missing module

2018-08-04 Thread john doe

Hi Adam,

On 8/4/2018 7:49 PM, Adam Dinwoodie wrote:

On Sat, 4 Aug 2018 at 15:11, john doe wrote:

Hi,

On a fresh install of Cygwin_x86_64, I have installed "git,git-email"
packages and I'm getting the following:

$ git send-email master --confirm=always --to=x...@example.com
BUG: The 'Mail::Address' module is not here, but NO_PERL_CPAN_FALLBACKS
was set!


Hi John,

The relevant Perl module should have been installed as a dependency of
the git-email package, which is how I (as the Cygwin Git maintainer)
meet that promise to provide the Mail::Address module. It's possible
that I've made an error in the package dependency records; I'm not
immediately able to check the details, but I should be able to look at
it next week.



Installing the package (perl-MailTools) suggested by  "Achim Gratz 
" fixes the issue.



In the interim, are you able to provide a cygcheck output file per the
instructions at http://cygwin.com/problems.html? That'll let me /
others on the list check if something has gone wrong with your
installation to mean things weren't installed correctly.



I'll be happy to provide that file (cygcheck -s -v -r), if I can send it 
privately.


Thanks Adam for your answer and thanks to any one who has contributed to 
this thread.


--
John Doe

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



git-email missing module

2018-08-04 Thread john doe

Hi,

On a fresh install of Cygwin_x86_64, I have installed "git,git-email" 
packages and I'm getting the following:


$ git send-email master --confirm=always --to=x...@example.com
BUG: The 'Mail::Address' module is not here, but NO_PERL_CPAN_FALLBACKS 
was set!


Git needs this Perl module from the CPAN, and will by default ship
with a copy of it. This Git was built with NO_PERL_CPAN_FALLBACKS,
meaning that whoever built it promised to provide this module.

You're seeing this error because they broke that promise, and we can't
load our fallback version, since we were asked not to install it.

If you're seeing this error and didn't package Git yourself the
package you're using is broken, or your system is broken. This error
won't appear if Git is built without NO_PERL_CPAN_FALLBACKS (instead
we'll use our fallback version of the module). at 
/usr/share/perl5/Git/LoadCPAN.pm line 76.
BEGIN failed--compilation aborted at 
/usr/share/perl5/Git/LoadCPAN/Mail/Address.pm line 8.
Compilation failed in require at /usr/libexec/git-core/git-send-email 
line 36.
BEGIN failed--compilation aborted at 
/usr/libexec/git-core/git-send-email line 36.


I had to install "Mail::Address" manually using cpan.

--
John Doe

--
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: Strange git issue with a particular repo

2018-08-05 Thread john doe

On 8/5/2018 9:12 AM, arn...@skeeve.com wrote:

Hi All.

Please cc me on responses, as I don't subscribe to the list.

I'm using a 64 bit install on Windows 10. I just now did an update
and it did not help.  The problem is with a particular repo only.
(Or at least, I only see it with this particular repo.) On Linux, do:

git clone git://github.com/arnoldrobbins/bwk-awk
cd bwk-awk
git status

You should see something like this:

$ git clone git://github.com/arnoldrobbins/bwk-awk
Initialized empty Git repository in /u/arnold/bwk-awk/.git/
remote: Counting objects: 463, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 463 (delta 1), reused 6 (delta 1), pack-reused 444
Receiving objects: 100% (463/463), 5.06 MiB | 1.77 MiB/s, done.
Resolving deltas: 100% (79/79), done.
$ cd bwk-awk
$ git status
# On branch master
nothing to commit (working directory clean)

On Cygwin, something strange happens instead:

$ git clone git://github.com/arnoldrobbins/bwk-awk
Cloning into 'bwk-awk'...
remote: Counting objects: 463, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 463 (delta 1), reused 6 (delta 1), pack-reused 444
Receiving objects: 100% (463/463), 5.06 MiB | 2.33 MiB/s, done.
Resolving deltas: 100% (79/79), done.
$ cd bwk-awk
$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working 
directory)

modified:   regdir/Compare.T
modified:   regdir/T.delete
modified:   regdir/T.getline
modified:   regdir/T.redir
modified:   regdir/T.split
modified:   regdir/T.sub

no changes added to commit (use "git add" and/or "git commit -a")

The "modified" files are from an earlier commit. Doing git reset --hard has
no effect.

On cygwin:

$ git --version
git version 2.17.0

On Linux:

$ git --version
git version 1.7.1

But it also works OK on a Linux system with git 2.17.1.

Any help would be appreciated. I hope that you can reproduce it.



Linux is case sensitive and Windows is case preserving.
That is probably the issue here, did the case of the files has been 
changed (rename 100%)?


https://docs.microsoft.com/en-us/vsts/repos/git/case-sensitivity?view=vsts

In other words, on "Cygwin" git can not handle files defering only by 
the case.


--
John Doe

--
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: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.11.0-0.1

2018-08-14 Thread john doe

On 8/14/2018 12:26 AM, Houder wrote:

On 2018-08-14 00:16, Eric Blake wrote:

On 08/13/2018 04:29 PM, Houder wrote:


The modication would require changing:

winsup/cygwin/fenv.cc (_feinitialise() )
winsup/cygwin/include/fenv.h (FE_ALL_EXCEPT)


GRRR! The file encoding of fenv.h is "cp1252" because of 2 characters 
in this

line:

  Intel® 64 and IA-32 Architectures Software Developer’s Manuals:

... part of a comment at the beginning of the file.

(the registered trademark sign (u00ae) is encoded as 0xae (cp1252), 
while it

  would be: 0xc2 0xae, in utf-8,
  the right single quotation mark (u2019) is encoded as 0x92 
(cp1252), but in

  utf-8 it would be: 0xc2 0x80 0x98)

I intend to convert the file encoding of fenv.h to utf-8. Is that a 
"No-No"

or is it allowed? (I assume GIT will notice).


In general, git doesn't care if you change a file's encoding - that's
just another content change.  In practice, you may get weird effects
when viewing that particular patch (as the patch is not well-formed in
the new multibyte locale, and looks funky when displayed in the old
locale), and emailing a patch may require care in telling git which
encoding to use for the email; but that's cosmetic, and shouldn't
matter in the long run.  Updating the code base to uniformly use UTF-8
seems reasonable to me.


... and emailing a patch may require care in telling git which encoding
to use for the email ... Huh, huh ?

Last time I used:

  - git format-patch
  - git send-mail

Am I safe here?



To better understand what has happened in the code cosmetic changes 
should be done in separate commits.


- Code changes -- Will only change the code.
- Cosmetic changes -- Will only change the cosmetic aspect of the code 
(encoding, spacing, indentation ...)


In most cases you can simply do 'git send-email' and pass the options 
for 'git format-patch' at the end of the cmd:


$ git send-email master --to=m...@example.com --reroll-count 1 --rfc


The options '--reroll-count, --rfc' are format-patch options.

--
John Doe

--
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: equivalent to su or sudo?

2018-08-17 Thread john doe

On 8/17/2018 12:01 PM, Ulli Horlacher wrote:

I need to run some scripts with full administrator rights (for chown,
chmod, setfacl).
Is there a cygwin equivalent to su or sudo?



https://stackoverflow.com/questions/4090301/root-user-sudo-equivalent-in-cygwin

--
John Doe

--
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: distributing preconfigured cygwin

2018-08-17 Thread john doe

On 8/17/2018 11:41 AM, Ulli Horlacher wrote:

On Sat 2018-07-14 (16:31), Achim Gratz wrote:


You have to install Cygwin, not "transfer".


I have several 100 users, none of them is able to install cygwin and
the packages they need the official way, they are way to *CENSORED* for
this job :-}


If they can follow your current instructions, they can surely start some
script that does this correctly?


I do not have a script which installs all needed packages.



I give them my preconfigured cygwin.zip (or cygwin64.zip) and tell them to
unpack it in C:\

http://fex.belwue.de/usecases/cygwin.html


Whatever you call it, it's still cludgey nonsense that might or might
not work.  Only when it's not working your users will really be unable
to figure out what to do since they won't even know what is failing.


So far, it has worked for all my users. No one is complaining.



script that calls setup to install it and any other packages you need
(if not already installed by way of dependency).  Setup can deal with
multiple package repositories, so you can use one of the official
mirrors as the primary package repository and only provide your package
as an add-on repository (like cygwin ports does).


How do I write such a script?
Is there documentation/examples about this?

This install script must first download the cygwin base package, install
it and then run setup with all needed cygwin packages.
But at the very beginning, I do not have a shell at all?



Basically, you create a batch script that would execute a powershell script.
The powershell script will handle the download of the setup file, 
installation of cygwin, installation of extra packages, detect 32/64bit 
architecture...


The batch script is easier for the user to execute and you can also run 
the powershell script as administrator, if needed.


From a CLI pass  the '-h, --help' option to the setup file to get all 
available options.


--
John Doe

--
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: distributing preconfigured cygwin

2018-08-29 Thread john doe

On 8/29/2018 11:13 AM, Ulli Horlacher wrote:

On Fri 2018-08-17 (20:28), Achim Gratz wrote:


This install script must first download the cygwin base package, install
it and then run setup with all needed cygwin packages.
But at the very beginning, I do not have a shell at all?


Use either CMD or PowerShell as appropriate.


I do not know PowerShell. It looks very complicated to me.



You could also use the language you speak, that language interpreter 
would need to be package as well though.


--
John Doe

--
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: How to Setup Multiple System Distro Manpages

2018-07-15 Thread john doe

On 7/14/2018 10:50 PM, Brian Inglis wrote:

Hi folks,
I've installed a few WSL distros for comparison and downloaded a bunch of other
manpage sets and unpacked them:
$ l src/man/*[0-9].tar.gz
src/man/CentOS_7.1.tar.gz  src/man/NetBSD_7.1.tar.gz
src/man/Darwin_7.0.1.tar.gzsrc/man/OpenBSD_6.2.tar.gz
src/man/Debian_8.1.0.tar.gzsrc/man/Red_Hat_Linux_i386_9.tar.gz
src/man/FreeBSD_12.tar.gz  src/man/SunOS_5.10.tar.gz
src/man/FreeBSD_Ports_11.1.tar.gz  src/man/SuSE_Linux_i386_11.3.tar.gz
src/man/HP-UX_11.22.tar.gz src/man/X11_R7.4.tar.gz

$ l /proc/cygdrive/c/usr/local/share/man/
cat1/  debian@  man1p/  mann/   SunOS-5.10/
cat3/  Debian-8.1.0/man2/   netbsd@ suse@
cat5/  freebsd@ man3/   NetBSD-7.1/ SuSE-11.3/
cat7/  FreeBSD-12-current/  man3p/  openbsd@ubuntu@
cat8/  FreeBSD-ports-11.1-RELEASE/  man4/   OpenBSD-6.2/x@
centos@hpux@man5/   ports@  X11R7.4/
CentOS-7.1/HP-UX-11.22/ man6/   redhat@
darwin@man0p/   man7/   RedHat-9-i386/
Darwin-7.0.1/  man1/man8/   solaris@

but despite reading docs, adding links and changing configs, I'm unable to get
man/-db to access these with or without the -m system switch.

I know I must be missing some essential point, but searching has not come up
with anything to help me fix this.

Has anyone here set this up and can suggest an approach that will work?



In addition to the other answers; maybe exporting those directories in 
the 'PATH' env variable...


--
John Doe

--
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: How to Setup Multiple System Distro Manpages

2018-07-15 Thread john doe

On 7/15/2018 9:21 AM, Brian Inglis wrote:

On 2018-07-15 00:39, john doe wrote:

On 7/14/2018 10:50 PM, Brian Inglis wrote:

I've installed a few WSL distros for comparison and downloaded a bunch of other
manpage sets and unpacked them:
$ l /proc/cygdrive/c/usr/local/share/man/
cat1/  debian@  man1p/  mann/   SunOS-5.10/
cat3/  Debian-8.1.0/    man2/   netbsd@ suse@
cat5/  freebsd@ man3/   NetBSD-7.1/ SuSE-11.3/
cat7/  FreeBSD-12-current/  man3p/  openbsd@    ubuntu@
cat8/  FreeBSD-ports-11.1-RELEASE/  man4/   OpenBSD-6.2/    x@
centos@    hpux@    man5/   ports@  X11R7.4/
CentOS-7.1/    HP-UX-11.22/ man6/   redhat@
darwin@    man0p/   man7/   RedHat-9-i386/
Darwin-7.0.1/  man1/    man8/   solaris@
but despite reading docs, adding links and changing configs, I'm unable to get
man/-db to access these with or without the -m system switch.
I know I must be missing some essential point, but searching has not come up
with anything to help me fix this.
Has anyone here set this up and can suggest an approach that will work?

In addition to the other answers; maybe exporting those directories in the
'PATH' env variable...


I already tried listing them all at the end of man-db.conf and MANPATH.



I was talking about the env 'PATH' var and not 'MANPATH' but that does 
not make any difference. :)


From the test I've done and using:

https://www.cyberciti.biz/faq/linux-unix-creating-a-manpage/

$ cat ${HOME}/try/mann/bogus.n
.\" Manpage for bogus.
.\" Contact vi...@nixcraft.net.in to correct errors or typos.
.TH man 8 "06 May 2010" "1.0" "bogus man page"
.SH NAME
bogus \- create a new LDAP user
.SH SYNOPSIS
bogus [USERNAME]
.SH DESCRIPTION
bogus is high level shell program for adding users to LDAP server.  On 
Debian, administrators should usually use bogus.debian(8) instead.

.SH OPTIONS
The bogus does not take any options. However, you can supply username.
.SH SEE ALSO
bogus(8), passwd(5), bogus.debian(8)
.SH BUGS
No known bugs.
.SH AUTHOR
Vivek Gite (vi...@nixcraft.net.in)

$ man --manpath=${HOME}/try bogus
man(8) 
bogus man page 
 man(8)


NAME
   bogus - create a new LDAP user

SYNOPSIS
   bogus [USERNAME]

DESCRIPTION
   bogus is high level shell program for adding users to LDAP 
server.  On Debian, administrators should usually use bogus.debian(8) 
instead.


OPTIONS
   The bogus does not take any options. However, you can supply 
username.


SEE ALSO
   bogus(8), passwd(5), bogus.debian(8)

BUGS
   No known bugs.

AUTHOR
   Vivek Gite (vi...@nixcraft.net.in)

1.0 
  06 May 2010 
         man(8)


HTH

--
John Doe

--
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: Cygwin Dirmngr and TBB for windows

2018-08-30 Thread john doe

On 8/30/2018 5:07 PM, Corinna Vinschen wrote:

On Aug 30 14:35, Marco Atzeri wrote:

Am 30.08.2018 um 11:30 schrieb john doe:

On 7/11/2018 10:11 AM, john doe wrote:

Hi,

I'm trying to get Cygwin dirmngr to work with  Tor Browser for Windows.

Following some discussion on the gnupg user list it looks like that
the connect(2) function in Cygwin does not return the proper error
code:

https://lists.gnupg.org/pipermail/gnupg-users/2018-July/060768.html

On the above link one of the dev suggest that connect(2) returns
EPERMS instead of ECONREFUSED.

If ECONREFUSED is not returned when port 9050 is queried the
fallback code in dirmngr will not be executed and port 9150 will
never be used.

Using dirmngr on Debian with TBBfor linux works as expected.

Can anyone confirm that and subcequently make Cygwin return the
proper error code?

Any help is appriciated.



As any one has been able to confirm that the issue is present in Cygwin
code?
I didn't see anything regarding this issue in the beta version of Cygwin
or did I mist it?



a Simple Test Case will help to verify the claim.


Full ACK.


connect is not expected to return EPERM
http://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html


Cygwin does not explicitely generate EPERM anywhere near
AF_INET/AF_INET6 code.  Nor does a Winsock error exist which
gets gonverted to EPERM.

The *only* way to generate EPERM is if an underlying Winsock function
returns an error code not handled by Cygwin.  I never encountered
that case, though.  Thus, a STC is highly appreciated.


Corinna



Thanks both for your answer and your willingness to look into this.

STC:
1)  Have Tor Browser for Windows up and running.
2)  Start dirmngr:
  $ mkdir ${HOME}/try
  $ dirmngr --homedir ${HOME}/try -vvv --debug-all --server --use-tor
  -> KS_GET -- 0x6C6ACD6417B3ACB1

Basically, dirmngr should be able to connect to TBB for Windows like it 
does on linux and retreave the key.


Let me know if more informations are needed.
I  came to this list  because the issue seems to come from Cygwin, 
according  to the discussion at the first URL in this e-mail.


--
John Doe

--
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: Cygwin Dirmngr and TBB for windows

2018-08-30 Thread john doe

On 7/11/2018 10:11 AM, john doe wrote:

Hi,

I'm trying to get Cygwin dirmngr to work with  Tor Browser for Windows.

Following some discussion on the gnupg user list it looks like that the 
connect(2) function in Cygwin does not return the proper error code:


https://lists.gnupg.org/pipermail/gnupg-users/2018-July/060768.html

On the above link one of the dev suggest that connect(2) returns EPERMS 
instead of ECONREFUSED.


If ECONREFUSED is not returned when port 9050 is queried the fallback 
code in dirmngr will not be executed and port 9150 will never be used.


Using dirmngr on Debian with TBBfor linux works as expected.

Can anyone confirm that and subcequently make Cygwin return the proper 
error code?


Any help is appriciated.



As any one has been able to confirm that the issue is present in Cygwin 
code?
I didn't see anything regarding this issue in the beta version of Cygwin 
or did I mist it?


--
John Doe

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



Cygwin Dirmngr and TBB for windows

2018-07-11 Thread john doe

Hi,

I'm trying to get Cygwin dirmngr to work with  Tor Browser for Windows.

Following some discussion on the gnupg user list it looks like that the 
connect(2) function in Cygwin does not return the proper error code:


https://lists.gnupg.org/pipermail/gnupg-users/2018-July/060768.html

On the above link one of the dev suggest that connect(2) returns EPERMS 
instead of ECONREFUSED.


If ECONREFUSED is not returned when port 9050 is queried the fallback 
code in dirmngr will not be executed and port 9150 will never be used.


Using dirmngr on Debian with TBBfor linux works as expected.

Can anyone confirm that and subcequently make Cygwin return the proper 
error code?


Any help is appriciated.

--
John Doe

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

2018-10-22 Thread john doe
On 10/22/2018 6:32 PM, sidrah ijaz wrote:
> could not compute FAST_CWD pointer
> 

Not sure if the above is a question.

https://cygwin.com/faq/faq.html#faq.using.fixing-find_fast_cwd-warnings

HTH.

-- 
John Doe

--
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: urgent help for tool

2018-10-22 Thread john doe
On 10/22/2018 5:05 PM, Samir Bouaziz wrote:
> Hello, 
> Am Full professor and I using Cygwin included in the university program of 
> ALTERA tool (university program monitor). 
> it works fine on WIN7 but after installation on WIN10 the compilation give me 
> this message: 
> 1 [main] bash 9316 find_fast_cwd: WARNING: Couldn't compute FAST_CWD pointer. 
> Please report this problem to 
> the public mailing list cygwin@cygwin.com 
> 
> Could you sold my problem. 
> I use cygwin in teaching labs and it's includes in ALTERA university program 
> monitor. 
> 

https://cygwin.com/faq/faq.html#faq.using.fixing-find_fast_cwd-warnings

HTH.

-- 
John Doe

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

2018-10-22 Thread john doe
On 10/22/2018 4:58 PM, Cartões Bella Arte wrote:
> C:\Users\gian.Bortoli\Desktop\john180j1w\run>zip2john.exE -A
> 
>   0 [main] zip2john 10064 find_fast_cwd: WARNING: Couldn't compute
> FAST_CWD pointer.  Please report this problem to the public mailing list
> cygwin@cygwin.com 
> zip2john: unknown option -- A
> 
>  
> 
> C:\Users\gian.Bortoli\Desktop\john180j1w\run>john.exe --pot=018.pot
> --wordlist=john/run/password.lst 018.hash
> 
>   0 [main] john 8972 find_fast_cwd: WARNING: Couldn't compute FAST_CWD
> point
> 
> er.  Please report this problem to the public mailing list cygwin@cygwin.com
> 
> No password hashes loaded (see FAQ)
> 

This is, if I'm not mistaking, the third e-mails in a little while with
to some extend the same error, verry strange.
But here we go again:

https://cygwin.com/faq/faq.html#faq.using.fixing-find_fast_cwd-warnings

HTH.

-- 
John Doe

--
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: Is who -b command available? Need to know when computer was started.

2018-10-16 Thread john doe
On 10/16/2018 5:36 PM, Peder Sverdrup via cygwin wrote:
> Hi,
> 
> I am making a script and need to know when the computer was last booted.
> This can be done with
> 
> who -b command. I have installed the minimum cygwin and this command is not
> available.
> 
> Which package do I need to install in order to have this command available
> (or any other command
> 
> that can tell when the computer was last booted).
> 

If you have 'SystemInfo' you could try:

$ cmd.exe /C "SystemInfo /FO list" | grep 'System Boot Time'

-- 
John Doe

--
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: WARNING: Couldn't compute FAST_CWD pointer

2018-10-24 Thread john doe
On 10/24/2018 4:36 PM, Stephen John Smoogen wrote:
> On Wed, 24 Oct 2018 at 10:32, Ng Wai Kin  wrote:
>>
>> Windows 10.
> 
> That is not enough information to help anyone here. What software is
> showing this and what is the course you are using it in. The problem
> is that the software needs to be updated and recompiled to work with
> newer Cygwin versions, and whoever is the provider did not change the
> error message to say contact them versus this list.
> 

See also the  below URL or the archive of this mailing list::

https://cygwin.com/faq/faq.html#faq.using.fixing-find_fast_cwd-warnings

-- 
John Doe

--
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: Does cygwin E-mail list still work?

2018-11-01 Thread john doe
On 11/1/2018 7:48 PM, Frank Farance wrote:
> Hi, I haven't seen any E-mail traffic since 2018-09-11.  Is the list
> still active?  Did I get unsubscribed?
> 
> Frank Farance
> 
> 
> -- 
> 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
> 

Yes, the list is still active (have a look at the list archive (1))

https://cygwin.com/lists.html


-- 
John Doe

--
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: problem with my Grads Aplication

2018-11-02 Thread john doe
On 11/2/2018 2:58 AM, Rafika Sri Nurjannah wrote:
>  Couldn't compute FAST_CWD pointer. to Grads
> 

https://cygwin.com/faq/faq.html#faq.using.fixing-find_fast_cwd-warnings

-- 
John Doe

--
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: problem with my Grads Aplication

2018-11-02 Thread john doe
On 11/2/2018 8:11 AM, Marco Atzeri wrote:
> Am 02.11.2018 um 07:32 schrieb john doe:
>> On 11/2/2018 2:58 AM, Rafika Sri Nurjannah wrote:
>>>   Couldn't compute FAST_CWD pointer. to Grads
>>>
>>
>> https://cygwin.com/faq/faq.html#faq.using.fixing-find_fast_cwd-warnings
>>
> 
> Joe,
> if you do not reply also to the sender, it is not very useful
> as it is almost sure that they are not in the mailing list.
> 

Marco, is there anyway to know with out guessing if the OP is subscribed
to the list?

-- 
John Doe

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



Mutt and gpg 1.4

2018-09-19 Thread john doe

Hi,

When I install 'mutt' through command line '... --packages mutt ...' it 
works.

gpg-1.4.23 is installed as dependency.

I rather use gpg4win already installed on my host.

How can I remove gpg-1.4.23 and all related dependencies through command 
line or how can I prevent, through command line, 'gpg' from being 
installed when installing mutt?


Thanks for any help.

--
John Doe

--
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: Trying to run a crontab in cygwin

2018-09-26 Thread john doe
On 9/26/2018 7:14 PM, Indrieri, Timothy wrote:
> To Whom this may concern,
> 
> I am trying to run a .sh file in cygwin. I have followed multiple tutorials. 
> But cannot get the scheduler crontab to run.
>

My understanding is that a cron job can be emulated by using the task
scheduler.

https://stackoverflow.com/questions/7195503/setting-up-a-cron-job-in-windows/21502661

Alternatively, have a look here:

https://www.davidjnice.com/cygwin_cron_service.html

> Please let me know if there is some step I missed.
> 

What step(s) did you do?

-- 
John Doe

--
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: Mutt and gpg 1.4

2018-09-20 Thread john doe

On 9/19/2018 7:49 PM, cyg Simple wrote:

On 9/19/2018 11:51 AM, john doe wrote:

Hi,

When I install 'mutt' through command line '... --packages mutt ...' it
works.
gpg-1.4.23 is installed as dependency.

I rather use gpg4win already installed on my host.

How can I remove gpg-1.4.23 and all related dependencies through command
line or how can I prevent, through command line, 'gpg' from being
installed when installing mutt?



I can say from experience that the two do not mix well.  The file
permissions and locking between the two distributions of gpg do not lend
to coexistence.  Rather you should be sure to use an export->import
process to keep the two databases in sync.  Do not point your Windows
GPG port and your Cygwin gpg to the same database.

Aside from what I've mentioned in the above, Cygwin mutt is tied to
Cygwin gpg via the library interface so you can't get rid of it.  You
just need to keep the two DB happily in sync which may not be an easy
process if both are adding to their DB, you'll need to export both, add
the differences to one export and import to both.



Reading this thread, and given the fact that "gnupg" is not officially 
supported on Cygwin.

That left me with two options:

1)  Use cygwinnized gnupg
2)  use gpg4win and enigmail

Any thoughts?

Thanks to "Marco Atzeri" and "Doug Henderson" for their answers and "cyg 
Simple" for the above.


--
John Doe

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



Permissions not set for 'other' when copying from Windows

2018-12-17 Thread john doe
Hi,

I'm trying to understand why a copied file from 'C:\' into
/home/user/try doesn't have the permissions set for 'other' (see below).

The following will create a file named 'try.txt':

PS C:\> new-item try.txt -itemtype file


Directory: C:\


ModeLastWriteTime Length Name
- -- 
-a---12/17/2018  04:10 PM  0 try.txt


PS C:\>


Now copying the newly created file using the cp command on Cygwin:

user@hostname ~/try
$ cp /cygdrive/c/try.txt $PWD/


Now, the touch utility is used to create a file named 'touch.txt':

user@hostname ~/try
$ touch touch.txt

The ls command shows:

user@hostname ~/try
$ ls -l
total 0
-rw-r--r-- 1 user None 0 Dec 17 04:12 touch.txt
-rwxr-x--- 1 user None 0 Dec 17 04:12 try.txt


When the file is created with the touch utility, the permissions are
properly set for 'user', 'group', and 'other' but when the file is
copied from outsite of Cygwin only the 'user' and 'group' permissions
are set.
Obviously, 'other' is not used on Cygwin, everytime the file is SCPed on
a linux server the permissions need to be change for 'other' to match
the permissions on that server.
Why is that so and is there a better way around this?


-- 
John Doe

--
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: Permissions not set for 'other' when copying from Windows

2018-12-17 Thread john doe
On 12/17/2018 1:15 PM, Corinna Vinschen wrote:
> On Dec 17 13:06, john doe wrote:
>> Hi,
>>
>> I'm trying to understand why a copied file from 'C:\' into
>> /home/user/try doesn't have the permissions set for 'other' (see below).
> 
> POSIX "other" == Windows "Everyone".  Windows default permissions
> typically don't give permissions to "Everyone".  Thus POSIX "other"
> has no permissions by default after copying such a file.
> 

Thank you, it works:

PS C:\> & icacls try.txt /grant "*S-1-1-0:(GA)"


The powershell way (set-acl) might be easier if you don't want to fiddle
with quoting and the call operator or simply use the command in cmd.exe
(no '&' and no quotes).

-- 
John Doe

--
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: Mount UNC path different user

2018-12-02 Thread john doe
On 12/2/2018 12:09 PM, Andrey Repin wrote:
> Greetings, john doe!
> 
>> How can I do the following on Cygwin?:
> 
> 
>> /sbin/mount.cifs //server/share /mount-point -o user=different-user
> 
>> In other words, how can I mount a windows share with a specific user ?
> 
> You can't. Cygwin is not a kernel module, it's a userspace program, and Cygwin
> mounts are bind mounts.
> 
> net use \\server\share /user:chosen\user *
> 
> Then you can use Cygwin mount to place the shared directory wherever you want.
> 

Thank you, looks like I forgot that Cygwin is on Windows! :)

-- 
John Doe

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



Mount UNC path different user

2018-12-02 Thread john doe
Hi,

How can I do the following on Cygwin?:


/sbin/mount.cifs //server/share /mount-point -o user=different-user

In other words, how can I mount a windows share with a specific user ?


-- 
John Doe

--
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: bash string-operator problem

2019-02-21 Thread john doe
On 2/21/2019 5:18 PM, Lee wrote:
> On 2/21/19, Rockefeller, Harry  wrote:
>> CYGWIN_NT-6.1 HARRYR-PC 3.0.0(0.336/5/3) 2019-02-16 13:21 x86_64 Cygwin
>> GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin)
>>
>> #!/bin/bash
>> A="A"
>> B="A"
>> if [ $A!=$B ]; then  <- needs spaces around the !=
>> echo -e "not identical"
>> fi
>> if [ $A==$B ]; then <-- needs spaces around the ==
>> echo -e "identical"
>> fi
>> exit 0
>>
>> Running this script gives
>> not identical
>> identical
>>
>> Both tests are true.
>
> because you're testing "A==B"
> you need to give 3 parameters  "A"  "=="  "B"
>
> $ cat x
> #!/bin/bash
> A="A"
> B="A"
> if [ $A != $B ]; then
> echo  "not identical"
> fi
> if [ $A == $B ]; then
> echo  "identical"
> fi
> if [ A!=B ]; then
> echo  "not identical"
> fi
> if [ A==B ]; then
> echo  "identical"
> fi
>

One equal sign ('=') should be used instead of two equal signs ('==').

--
John Doe

--
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: find_fast_cwd auto-responder test

2019-02-13 Thread john doe
On 2/13/2019 10:56 PM, Andrey Repin wrote:
> Greetings, Corinna!
>
> Since many authors of such messages aren't subscribed to the list, the
> author's Reply-To or From email address needs to be added to the list of
> recipients.
>

If my understanding is correct, 'X-IsSubscribed: yes' indicates if the
OP is subscribed to the list.

A big thank you for looking into this.

--
John Doe

--
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: Download setup-x86_64 issue

2019-06-04 Thread john doe
On 6/4/2019 8:09 PM, Eliot Moss wrote:
> On 6/4/2019 2:00 PM, john doe wrote:
>> Hi, I'm trying to download the setup file to update cygwin using
>> powershell but it fails miserably:
>>
>> PS > (new-object system.net.webclient).do
>> wnloadfile("https://www.cygwin.com/setup-x86_64.exe;, "$PWD/try.exe")
>> Exception calling "DownloadFile" with "2" argument(s): "The underlying
>> connecti
>> on was closed: An unexpected error occurred on a send."
>> At line:1 char:47
>> + (new-object system.net.webclient).downloadfile <<<<
>> ("https://www.cygwin.com/
>> setup-x86_64.exe", "$PWD/try.exe")
>>  + CategoryInfo  : NotSpecified: (:) [],
>> MethodInvocationException
>>  + FullyQualifiedErrorId : DotNetMethodException
>>
>>
>> It works for other URLs and would appriciate any input on the above.
>
> I just download with a web browser.  Any reason you have
> to do this programmatically instead?  Also, I know little
> about PS, but it could be that it just doesn't approve of
> this as a Microsoft-blessed kind of thing.  When I invoke
> setup, I get popups about this not being from the Windows
> Store, etc. -- simply plow on.
>

Yes, I'm using Powershell to update Cygwin through a script and the
script fails at the download step.


> Also, a web search suggests that wget to PowerShell is
> also fine.
>

I meant Cygwin's wget, the idea is to not require any extra tool(s) to
update Cygwin, sorry about that.

> And here's another tidbit from the web:
>
> powershell -NoProfile -ExecutionPolicy unrestricted -Command (new-object
> System.Net.WebClient).Downloadfile('http://10.10.10.10:7000/iw4455.exe',
> 'C:\windows\temp\iw4455.exe')
>
> Perhaps the ExecutionPolicy thing is relevant here?
>

No -- se above, thanks anyway.

> Anyway, this question does not seem to be cygwin-specific, but
> more about PS ...

Everything was working a fiew days ago, and now, it isn't.

Thanks for your input.

--
John Doe

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



Download setup-x86_64 issue

2019-06-04 Thread john doe
Hi, I'm trying to download the setup file to update cygwin using
powershell but it fails miserably:

PS > (new-object system.net.webclient).do
wnloadfile("https://www.cygwin.com/setup-x86_64.exe;, "$PWD/try.exe")
Exception calling "DownloadFile" with "2" argument(s): "The underlying
connecti
on was closed: An unexpected error occurred on a send."
At line:1 char:47
+ (new-object system.net.webclient).downloadfile <<<<
("https://www.cygwin.com/
setup-x86_64.exe", "$PWD/try.exe")
+ CategoryInfo  : NotSpecified: (:) [],
MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException


It works for other URLs and would appriciate any input on the above.


P.S.

Using Wget on this w7works.

--
John Doe

--
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: getpriority() and top display for priority inconsistent

2019-08-15 Thread john doe
On 8/15/2019 1:04 PM, Houder wrote:
> On Thu, 15 Aug 2019 12:20:38, Corinna Vinschen  wrote:
>>
>> On Aug 15 09:41, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote:
>>>> git format-patch output with commit message, please?
>>> =20
>>> Please educate me how to do that;  I am just using "git diff --no-color".
>>
>> $ git add 
>> $ git commit
>>
>>   - opens editor to create a commit message.  first line is summary,
>> second line stays empty, descriptive text follows in line 3+.
>>

So, your commit message should have the form of:
"Subject line

Commit message"

A subject line is maximum 50 character long
A subject line starts in the imperative mode and does not end with any
punctuation marks.

The commit message is 72 character long.

--
John Doe

--
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: getpriority() and top display for priority inconsistent

2019-08-15 Thread john doe
On 8/15/2019 11:41 AM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
wrote:
>> git format-patch output with commit message, please?
>
> Please educate me how to do that;  I am just using "git diff --no-color".
>

$ git format-patch --stdout 

If you want to request for comment you could use 'git send-email' on
your own patch.

Basically, you need to familiorize yourself with 'git format-patch' and
'git send-email'.

--
John Doe

--
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: Odd, is it not? mkdir 'e:\' cannot be undone by rmdir 'e:\' ...

2019-08-28 Thread john doe
On 8/28/2019 9:16 AM, Houder wrote:
> On Tue, 27 Aug 2019 11:44:17, Vince Rice  wrote:
>
>>> On Aug 27, 2019, at 11:28 AM, Houder wrote:
>>>
>>> On Tue, 27 Aug 2019 17:25:49, Corinna Vinschen  wrote:
>>>>
>>>> mkdir(2) has some special code from 2009 which drops trailing
>>>> {back}slashes to perform a bordercase in mkdir Linux-compatible.
>>>> This code snippet doesn't exist in rmdir(2).
>>>
>>> .. uhm, I must be speaking to the alter ego of Corinna V,. because
>>> as far as I know, Corinna has given herself some time off ...
>>>
>>> Perhaps you could make an entry in her "TODO list" that the 3 lines
>>> above requires some more explanation for pour souls like me.
>>
>> I am not Corinna, but I read that as
>> The mkdir command works because it has special code added to it to make
>> it work. The rmdir command doesn't work because it doesn't have the same
>> code in it.
>
> Right, "Corinna" Number Three.
>
> Before I sent my question to the list, I had fired up the debugger and
> lured it in providing me the neccessary info:
>
> It showed me that my input (e:\) was being "mutilated" at the start of
> mkdir() in winsup/cygwin/dir.cc
>
> Using git I had found the "suspicious-looking" commit by Eric Blake:
>
>  - 
> https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=52dba6a5c45e8d8ba1e237a15213311dc11d91fb
>( Fix some POSIX-compliance bugs in link, rename, mkdir. )
>
> --
> authorEric Blake 
> Sat, 26 Sep 2009 15:51:53 + (15:51 +) <
> committer Eric Blake 
> Sat, 26 Sep 2009 15:51:53 + (15:51 +)
> commit52dba6a5c45e8d8ba1e237a15213311dc11d91fb
> --
>
> Note September 2009! (as hinted by Corinna's alter ego)
>
> In short, neither the answer by Corinna's alter ego nor your translation
> raised the level of the knowledge that I had already acquired.
>
> Linux-compat. Really?
>
> Who in his right mind would want to create a subdirectory e:\ on Linux?
>
> ls -ld 'e:\'
> stat 'e:\'
> touch 'e:\'
> rmdir 'e:\'
>
> all refer to /drv/e # /cygdrive/e if not remapped
>
> Only mkdir does NOT.
>
> And I am the only one who finds this a bit odd? That why I asked: why
> cannot mkdir and rmdir be symmetrical w/ respect to e:\ ?
>
> Because of Linux? Weird.
>
> Now I have to tell a newbie on Cygwin, that he should use
>
> mkdir 'e:\.' BUT rmdir 'e:\'
>
> in order to observe the same results as the Windows equivalents do.
>
> (yes, he should use mkdir /drv/e and rmdir /drv/e)
>
> Tampi.
>

As hinted out  in here, backporting the code snippet from mkdir to rmdir
would solve your issue.

--
John Doe

--
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: OPENMPI only works on Cygwin Terminal not windows Command Line

2019-10-27 Thread john doe
On 10/27/2019 4:33 AM, William John wrote:
> Dear Cygwin,
>
> I recently installed openmpi and libopenmpi-devel on my windows machine.
> However, I cannot call mpicc on my windows cmd, rather I get "'mpicc' is
> not recognized as an internal or external command, operable program or
> batch file". This is weird because I have added C:\cygwin64\bin
> and C:\cygwin64 to my System variables. The command mpicc --version also
> works on my cygwin terminal so I am kind of confused here as to what to do
> with the set up. I checked the bin inside cygwin64 and I found mpicc and
> mpiexec, I am just confused as to what is going on with the configuration
> for my windows command line. Would it be possible to direct me to a
> solution or to help me with this?
>
>
> Best,
>

Did you restart the Windows host after adding the path in env var?

--
John Doe

--
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: anyone interested in loading a portable drive?

2020-01-26 Thread john doe
On 1/27/2020 7:38 AM, Brian Inglis wrote:
> On 2020-01-26 21:33, aimedtech wrote:
>> Okay, this is a complaint.  I've spent the past few days trying to download
>> the Cygwin system and gotten nowhere. I've tried several download
>> environments, using different protocols, nothing works.
>>
>> And this is beyond being a pain, this is getting to be a real problem for
>> me. No, that's not right -- it is a problem for me, NOW.
>>
>> I remember, I downloaded, installed it and used it, this was about a decade
>> ago. Then, the area for naming the machine download sites would fill in
>> automatically; Today, no. I chose a couple and tried them, one at a time.
>> Neither worked
>>
>> I'm not sure if this message is to just tell you that your install is very
>> broken and goodbye or if I'm asking for help.
>>
>> I am willing to send someone a USB 1TB drive and pay $50 bucks to load it
>> and send it back. If that's what I do I want everything. The works.
> This is an all-volunteer project and mirrors are donated by the server owners.
>
> Weekends are busy times for backups and security upgrades on publicly 
> accessible
> free servers, and if there are problems, support may not be available until 
> the
> next work day, after serious production issues are dealt with.
>
> Similarly for answers and support from here.
>
> The world has changed and Cygwin has become larger in the last decade (148GB
> according to the Mirrors page).
>
> You *MUST* download the latest x86/_64 installer from the home page
> setup-x86/_64.exe links to get the latest active mirrors and use the current 
> key:
>
>   https://cygwin.com/setup-x86_64.exe
>   https://cygwin.com/setup-x86.exe
>
> Selection from the latest active mirrors to use is easiest by browsing the
> linked Mirror Sites page:
>
>   https://cygwin.com/mirrors.html
>
> and you should see if you can recognize nearby sites which are likely to have
> big servers and fast pipes.
>
> You may find your closest site(s) overloaded, slow, and connectivity
> intermittent, depending on the site ownership, day of week, time of day, 
> network
> path to you, other users on the site and on your local ISP feeds.
>
> Avoid evenings and weekends, when many others nearby are downloading the 
> newest
> Amazon Prime, Apple+. Disney+, Netflix, etc. series to binge watch, and your 
> ISP
> is also throttling retail customers, to free up bandwidth for their business
> customers doing offsite streaming backups.
>
> Searching for an unofficial mirror at a nearby local university or (Unix) User
> Group publicly available on the internet may give you better results.
>
> Sometimes the closest mirrors may not be the fastest or most reliable, and ftp
> sites nowadays are slower, less available and reliable than http/https sites, 
> as
> web sites get the big bucks, servers, memory, and pipes, but ftp sites may be
> kept around only as long as nothing goes wrong with their old server.
>
> Ping, traceroute, simple adhoc bandwidth and throughput tests will give you an
> idea of the best performance, and experience will tell you about reliability.
>
> Start by downloading only the base packges or upgrading what you have 
> installed,
> and be patient during postinstall steps, as rebasing all the DLLs, and
> rebuilding updated pages in the man DB, can take a while with large upgrades 
> or
> outdated installs.
>

If you are planning to install Cygwin on many hosts, using apt-cacher-ng
or alike might be of interest to you.

--
John Doe

--
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: help compilation qemu

2020-05-02 Thread john doe
On 5/2/2020 9:28 PM, Juan carlos Rebate via Cygwin wrote:
> Hello, it is the first time that I write here, sorry for the possible
> malfunctions of the mailing list.I am interested in compiling qemu with
> cygwin and the documentation is scarce, it only indicates that the
> environment is complete but it does not indicate all the necessary
> components,The components that they mention are not available in cygwin,
> for example Mingw64-686-pkconfig is not included in the repositories, could
> someone give me a complete manual? Thank you very much in advance
> --

FYI, qemu for Windows is available.

--
John Doe
--
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: Remotely restart a windows machine

2020-09-25 Thread john doe

On 9/25/2020 3:32 PM, Peter J. Krum via Cygwin wrote:

I used this command on ubuntu:
net rpc shutdown -r -f -t 30  -I 123.123.123.123 -U user:pass

What would be the equivalent in CYGWIN?
--


What error/issue are you having?

--
John Doe
--
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: Remotely restart a windows machine

2020-09-25 Thread john doe

On 9/25/2020 4:28 PM, Peter J. Krum via Cygwin wrote:

The syntax of this command is:

NET
 [ ACCOUNTS | COMPUTER | CONFIG | CONTINUE | FILE | GROUP | HELP |
   HELPMSG | LOCALGROUP | PAUSE | SESSION | SHARE | START |
   STATISTICS | STOP | TIME | USE | USER | VIEW ]



This is a Windows command, I would look at 'shutdown.exe' or whatever
tools is using rpc to restart windows remotely.

--
John Doe
--
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: Unable to start Cygwin64 terminal after password change

2021-08-03 Thread john doe via Cygwin

On 8/3/2021 8:12 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin wrote:

"during user-initiated shutdowns, the kernel, drivers, and services are
preserved and restored, not just restarted."


Which was why I specifically used "shutdown /r", which is:

 /r Full shutdown and restart the computer.

We've been advised by our admins that this command does a true and
full restart of the system, including all the kernel parts of it.



If I'm not mistaking, this command has nothing to do with "fastboot".


You may want to check with your AD server admins about this possibility.


I decided to restart my computer on Saturday, while the password had been 
changed
Thursday afternoon.  Meanwhile I was perfectly able to actually _use_ my new 
password
to unlock that very same Windows host, and login to different hosts (as soon as 
the
new password was set, and before as well as after the reboot of my work PC).
So the caching theory is not quite substantiated, IMO.


You may want to check with your AD server admins about this possibility.


I did!  And they said: "no new policies were added and no current policies were 
changed".

I repeat it again:  my new password was working everywhere I needed to enter


Might be better to reword than to repeat again.

--
John Doe

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


Program files environmental variables

2021-11-23 Thread john doe via Cygwin

Cygwins,

Is there a way to get the value of PROGRAMFILES(x86) and PROGRAMW6432 in
Bash:

$ echo $PROGRAMFILES; echo "$PROGRAMFILES(x86)"; echo $PROGGRAMW6432
C:\Program Files
C:\Program Files(x86)

$ cmd.exe /C "echo %PROGRAMFILES% %PROGRAMFILES(x86)% %PROGRAMW6432%"
C:\Program Files C:\Program Files (x86) C:\Program Files


PROGRAMFILES works in Bash but not the other two.

I could not find anything relevent in the archive or when googling.

--
John Doe

--
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: Program files environmental variables

2021-11-23 Thread john doe via Cygwin

On 11/23/2021 10:37 AM, Daniel Abrahamsson wrote:

John Doe wrote:


Cygwins,

Is there a way to get the value of PROGRAMFILES(x86) and PROGRAMW6432 in
Bash:

$ echo $PROGRAMFILES; echo "$PROGRAMFILES(x86)"; echo $PROGGRAMW6432
C:\Program Files
C:\Program Files(x86)

$ cmd.exe /C "echo %PROGRAMFILES% %PROGRAMFILES(x86)% %PROGRAMW6432%"
C:\Program Files C:\Program Files (x86) C:\Program Files


PROGRAMFILES works in Bash but not the other two.

I could not find anything relevent in the archive or when googling.

--
John Doe


We have a script where we use this workaround:

PROGRAMFILES86=$(env | sed -ne 's/^ProgramFiles(x86)=//p' )



I never thought using env like this, an alternative using awk:

$ env | awk -F= '/^ProgramFiles\(x86\)/{print $2}'
C:\Program Files (x86)


printenv is even better! :)

Thanks all for your input much appreciated.

--
John Doe

--
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: Program files environmental variables

2021-11-23 Thread john doe via Cygwin

On 11/23/2021 2:10 PM, Eliot Moss wrote:

On 11/23/2021 4:02 AM, john doe via Cygwin wrote:
 > Cygwins,
 >
 > Is there a way to get the value of PROGRAMFILES(x86) and PROGRAMW6432 in
 > Bash:
 >
 > $ echo $PROGRAMFILES; echo "$PROGRAMFILES(x86)"; echo $PROGGRAMW6432
 > C:\Program Files
 > C:\Program Files(x86)
 >
 > $ cmd.exe /C "echo %PROGRAMFILES% %PROGRAMFILES(x86)% %PROGRAMW6432%"
 > C:\Program Files C:\Program Files (x86) C:\Program Files
 >
 >
 > PROGRAMFILES works in Bash but not the other two.

PROGRAMW6432 exists in my Cygwin bash, and I know I did not set it


What version of Cygwin bash are you using?


explicitly.  As for the x86 one, parentheses are not allowed in
bash variable names.  In principle one could set up, say,
PROGRAMFILESx86, however no path of that kind is around in my
bash.  It would be possible to read it out and setup the variable.
I found, for example, that this prints out the setting of the
variable (but with other gorp you'd have to edit out):

echo "echo %PROGRAMFILES(x86)%; exit" | cmd



Thank you.

--
John Doe

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