Re: Command echo

2015-11-16 Thread Andrew DeFaria

On 11/16/2015 08:40 AM, Buchbinder, Barry (NIH/NIAID) [E] wrote:

Gluszczak, Glenn sent the following at Monday, November 16, 2015 11:16 AM


When I shell to cmd.exe, the commands I execute are echoed (not sure if
stdout or stderr). This doesn't happen under native cmd.exe. Is there a
variable that controls this? I only have CYGWIN=nodosfilewarning

Notice the commands "dir" and "whoami" are emitted to the output.


cmd.exe is in control of its own echoing.  Try starting as cmd /q
cmd /?
...
/Q  Turns echo off
...

As to why cmd behaves differently when started under bash (even in a
non-mintty window) than when started directly or under cmd 

Hope that helps.

- Barry
   Disclaimer: Statements made herein are not made on behalf of NIAID.


Mintty (and ssh, etc.) use pty's. cmd does not understand pty's. So if 
you run say Cygwin's bash from a cmd window and then start cmd you will 
not get the echoing. If, however, you start cmd from a bash shell that 
is in a mintty window then you're using pty's and you'll get echoing. 
Likewise if you run bash in a cmd window, then say ssh to another 
machine, you're now using pty's and you'll see the behavior again.

--
Andrew DeFaria
http://defaria.com


--
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: Every time I run ssh, ssh prompts "password:" with latest OpenSSH package.

2015-09-08 Thread Andrew DeFaria

On 09/02/2015 08:48 PM, Andrey Repin wrote:

Greetings, Hiroyuki Kurokawa!


Thanks Andrey for reply to my question.



George gave me an advice by a direct mail.
And his instruction solve my problem.



If you use dsa key type, you need to add to your ssh client configuration file, 
either ~/.ssh/config or /etc/ssh_config, the following parameter:

PubkeyAcceptedKeyTypes +ssh-dss

If you use some other key type, then 'ssh -Q key' will list all supported key 
types, pick the right one and put it into config file instead of ssh-dss.

I had the same problem after the last ssh upgrade.



Now the latest ssh works fine with ~/.ssh/config which contains
"PubkeyAcceptedKeyTypes +ssh-dss" because a type of my key is DSA.



I appreciate George so much.


This is not the right solution. Right solution would be to change your keys.
While DSA keys aren't inherently insecure (quite opposite), FIPS compliant
systems enforce DSA key length to 1024 bits, which is considered to be weak
nowadays. You CAN use longer DSA keys, but not all systems support it.


Or perhaps use ecdsa? ssh-keygen -t ecdsa

--
http://defaria.com;>Andrew DeFaria
http://clearscm.com;>ClearSCM, Inc.


--
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: Clean up /tmp on system reboot [was: Xorg server always starting up on DISPLAY 3.0]

2015-04-10 Thread Andrew DeFaria

On 4/10/2015 1:19 AM, Frank Fesevur wrote:

2015-04-10 9:49 GMT+02:00 Kizito Porta Balanyà:

I'm wondering how cron knows when a machine is rebooted.
What does cron check? Which parameter / file?
Do you know it?


$ man 5 crontab

See @reboot

Never used it but I assume it will run after cron service is started.

Regards,
Frank


I haven't used it either, but I saw it there. Makes you wonder what 
would happen if you simply restarted the service or stopped it and then 
started it again.

--
Andrew DeFaria
http://defaria.com


--
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: Clean up /tmp on system reboot [was: Xorg server always starting up on DISPLAY 3.0]

2015-04-09 Thread Andrew DeFaria

On 4/9/2015 5:51 AM, cyg Simple wrote:

From: Jim Reisert AD1C


Wouldn't it be nice if Cygwin cleaned up the /tmp directory each time the
computer is re-booted?  I don't know how that would work in real life,

however.




Simply create a scheduled task to execute a windows batch file on system
start that changes directory to the Cygwin /bin directory and executes sh -c
'rm -f /tmp/*'.

--
cyg Simple




Or use cron...
--
Andrew DeFaria
http://defaria.com


--
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: X11Forward and xauth problems

2015-03-26 Thread Andrew DeFaria

On 3/26/2015 12:12 PM, Jon TURNEY wrote:

On 25/03/2015 17:40, Andrew DeFaria wrote:

Prediction: This problem probably will end up having something to do
with the permissions and file system that ~/.Xauthority resides on,
which is, I believe, a NetApp. This file system is the file system for
the Linux Home directories (Windows home directories are somewhere
else). In an attempt to have a transparently workable environment I set
my Cygwin home directory to access the same directory my Linux servers
use for the home directory - this NetApp. If you need more information
about that then let me know and perhaps tell me how I can get that.


This seems very plausible.

If I am understanding you correctly, ~/.Xauthority is the same file on
the NetApp at both ends.  I think perhaps that is somehow the cause of
the problem.


Yes.



The sequence of actions is something like:

- startx(|win) generates a random cookie and stores it in
~/.serverauth.pid and uses that file as the server -auth option
- it also uses 'xauth add' to put that cookie into ~/.Xauthority for the
display (e.g. :0)


I'm not using startx - I just do C:\Cygwin\bin\XWin.exe -multiwindow 
-listen tcp


Note I don't see a ~/.serverauth. Maybe this file is created just for 
this purpose and quickly removed?



- ssh reads that cookie out of ~/.Xauthority using 'xauth list' and
sends it to the far end
- sshd tries to store that cookie using xauth for the proxy display (e.g
:10)

Reading the source of xauth [1], it does try to lock the ~/.Xauthority
file for up to 20 seconds before giving up, which perhaps corresponds to
the delay you see?


Sounds plausible. Is that configurable?


However, the unable to link authority file .Xauthority, use
.Xauthority-n message indicates that the working file .Xauthority-n
cannot renamed as .Xauthority (xauth tries both to hard-link it as
.Xauthority, and to rename it)


After I ssh -X to this system I do see ~/.Xauthority and 
~/.Xauthority-n. They are the same size but differ binarily. I can do mv 
~/.Xauthority-n ~/.Xauthority without issue. Why can't sshd do that?


Once I rename the file X clients work! From that machine...

So I thought this might be a crude workaround and put this in my .bashrc:

# Hack to fix ~/.Xauthority
if [ -f $HOME/.Xauthority-n ]; then
  mv $HOME/.Xauthority-n $HOME/.Xauthority
  echo Fixed ~/.Xauthority
fi

and then thought, What happens when I ssh into yet another Linux 
machine that shares this home directory and when I tried to ssh -X to 
another machine I got (with a little instrumentation):


Adefaria-lt:id
uid=20393(adefaria) gid=10513(Domain Users) groups=10513(Domain 
Users),0(root),545(Users)

Adefaria-lt:ssh -X cm-app-lprod01
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth:  unable to link authority file 
/home/adefaria/.Xauthority, use /home/adefaria/.Xauthority-n

Attempting mv /home/adefaria/.Xauthority-n /home/adefaria/.Xauthority
mv: cannot move `/home/adefaria/.Xauthority-n' to 
`/home/adefaria/.Xauthority': Permission denied

adefaria
uid=80176(adefaria) gid=701(Domain Users) groups=701(Domain 
Users),10013(CMAdmins),10014(CMMachines-admin.sec) 
context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
-rw---. 1 adefaria Domain Users 223 Mar 26 13:25 
/home/adefaria/.Xauthority
-rw---. 1 adefaria Domain Users 223 Mar 26 13:46 
/home/adefaria/.Xauthority-n

Cm-app-lprod01:mv .Xauthority-n .Xauthority
Cm-app-lprod01:

So the plot thickens... Why was mv denied permission when I can easily 
do it once I get a prompt?


Could it be because on Cygwin my uid is 20393 and on Linux it's 80176 
(and probably equivalenced by some mapping in the Netapp of 20393 - 80176?



Of course, sshd doesn't understand it's helpful advice to use a
different filename, so things don't work out so well. :)

Given that it works the first time, when there is no existing
~/.Xauthority, perhaps the NetApp doesn't permit this file to be renamed
over an existing file, for some reason?


But I did rename it once I got a prompt without a problem.


You can tell startx to use a different file by using the XAUTHORITY env
var, so setting that to something like ~/.Xauthority-$HOSTNAME might be
a workaround. (Some googling on 'Xauthority hostname nfs' might be
informative)


Again, I don't use startx, I simply run Xwin directly. In fact the 
startx command is not found! Setting XAUTHORITY didn't do anything different



Or editing startx and changing enable_xauth to 0 might also be a
workaround.


Since I don't even have startx, this is not really an option.

I need to read that googling on 'Xauthority hostname nfs'...vi

Any idea why setting ForwardX11 yes and ForwardX11Trusted don't seem to 
work? I thought it was that setting ForwardX11 yes is equivalent to 
specifying -X and setting ForwardX11Trusted yes is equivalent to 
specifying -Y but they are not behaving that way

Re: X11Forward and xauth problems

2015-03-26 Thread Andrew DeFaria

On 3/26/2015 3:06 PM, Andrew DeFaria wrote:

Not having to wait 20 seconds every time I start a remote terminal would 
be a plus too!

--
Andrew DeFaria
http://defaria.com


--
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: X11Forward and xauth problems

2015-03-25 Thread Andrew DeFaria
: Server accepts key: pkalg ssh-dss blen 435
debug2: input_userauth_pk_ok: fp 
SHA256:ZijSNCmYg0tL2z4LIcRGLDS+AF3Ms+8Md93qGF5zHtc

debug1: Authentication succeeded (publickey).
Authenticated to cm-app-ldev01 ([10.252.8.152]:22).
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Requesting no-more-sessi...@openssh.com
debug1: Entering interactive session.
debug2: callback start
debug2: x11_get_proto: /usr/bin/xauth  list :0 2/dev/null
Warning: No xauth data; using fake authentication data for X11 forwarding.
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 0: request x11-req confirm 1
debug2: fd 3 setting TCP_NODELAY
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug2: channel 0: request shell confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel_input_status_confirm: type 99 id 0
debug2: X11 forwarding request accepted on channel 0
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
/usr/bin/xauth:  unable to link authority file 
/home/adefaria/.Xauthority, use /home/adefaria/.Xauthority-n

Cm-app-ldev01:


You might also try running those xauth commands in the terminal to
investigate further.


Cm-app-ldev01:xauth list :0
Cm-app-ldev01:echo $?
0




Adefaria-lt:xhost +
access control disabled, clients can connect from any host
Adefaria-lt:ssh cm-app-ldev01
Cm-app-ldev01:export DISPLAY=adefaria-lt:0
Cm-app-ldev01:xclock
Error: Can't open display: adefaria-lt:0
Cm-app-ldev01:


If you want this to work, you will now (since X server 1.17) need to
start the server with the option '-listen tcp'.


Restarted Xwin with -multimonitor and -listen tcp. Now I get:


Sorry for any ambiguity, but you have misunderstood what I wrote.

If you want explicitly setting DISPLAY and allowing access using xhost
to work, you must start the server with the option '-listen tcp'.


Sorry I misunderstood. This works for me and is a work around. But I 
wish I could get that xauth thing working correctly.

--
Andrew DeFaria
http://defaria.com


--
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: X11Forward and xauth problems

2015-03-23 Thread Andrew DeFaria

On 3/23/2015 2:06 PM, Jon TURNEY wrote:

On 23/03/2015 20:48, Andrew DeFaria wrote:

Normally I just turn on -X (or put X11Forward yes in ~/.ssh/config) but
that usually results in a noticeable delay in logging in and the
following error:

Warning: untrusted X11 forwarding setup failed: xauth key data not
generated
Warning: No xauth data; using fake authentication data for X11
forwarding.


Firstly, if you don't want these warnings, use ssh -Y.

(By using ssh -X, you are asking for something which the X server can't
give you, hence the warnings.  See
http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-trusted-untrusted-x11-forwarding
for more details)


Yeah but -Y gives me the same thing:

Adefaria-lt:ssh -Y cm-app-ldev01
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth:  unable to link authority file 
/home/adefaria/.Xauthority, use /home/adefaria/.Xauthority-n

Cm-app-ldev01:




/usr/bin/xauth:  unable to link authority file
/home/adefaria/.Xauthority, use /home/adefaria/.Xauthority-n
Cm-app-ldev01:

I've asked about this in the past and I think the answer was that the
message was correct but you shouldn't worry about it. If it didn't slow


I'm sorry, I only have a vague memory of this discussion.


me down I probably would just ignore it. But it slows me down. So I ssh
instead without X11Forward turned on then, when I need to run an X
client, I do export DISPLAY=adefaria-lt:0 and make sure that I did an
xhost + there at least once. But now that's broken!

Adefaria-lt:xhost +
access control disabled, clients can connect from any host
Adefaria-lt:ssh cm-app-ldev01
Cm-app-ldev01:export DISPLAY=adefaria-lt:0
Cm-app-ldev01:xclock
Error: Can't open display: adefaria-lt:0
Cm-app-ldev01:


If you want this to work, you will now (since X server 1.17) need to
start the server with the option '-listen tcp'.


Restarted Xwin with -multimonitor and -listen tcp. Now I get:

Adefaria-lt:ssh -Y cm-app-ldev01
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth:  unable to link authority file 
/home/adefaria/.Xauthority, use /home/adefaria/.Xauthority-n

Cm-app-ldev01:echo $DISPLAY
localhost:10.0
Cm-app-ldev01:xclock
X11 connection rejected because of wrong authentication.
Error: Can't open display: localhost:10.0
Cm-app-ldev01:




[1] https://cygwin.com/ml/cygwin-xfree-announce/2015-02/msg00026.html
[2]
http://x.cygwin.com/docs/ug/using-remote-apps.html#using-remote-apps-telnet
[3]
http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-remote-clients-cant-connect

[4] https://cygwin.com/ml/cygwin-xfree/2015-02/msg00051.html




--
Andrew DeFaria
http://defaria.com


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



X11Forward and xauth problems

2015-03-23 Thread Andrew DeFaria
Normally I just turn on -X (or put X11Forward yes in ~/.ssh/config) but 
that usually results in a noticeable delay in logging in and the 
following error:


Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth:  unable to link authority file 
/home/adefaria/.Xauthority, use /home/adefaria/.Xauthority-n

Cm-app-ldev01:

I've asked about this in the past and I think the answer was that the 
message was correct but you shouldn't worry about it. If it didn't slow 
me down I probably would just ignore it. But it slows me down. So I ssh 
instead without X11Forward turned on then, when I need to run an X 
client, I do export DISPLAY=adefaria-lt:0 and make sure that I did an 
xhost + there at least once. But now that's broken!


Adefaria-lt:xhost +
access control disabled, clients can connect from any host
Adefaria-lt:ssh cm-app-ldev01
Cm-app-ldev01:export DISPLAY=adefaria-lt:0
Cm-app-ldev01:xclock
Error: Can't open display: adefaria-lt:0
Cm-app-ldev01:

I still don't understand xauth but I've been playing with it and I can 
sometimes get it to work.


Adefaria-lt:rm ~/.Xauthority*
Adefaria-lt:ssh -X cm-app-ldev01 xclock
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth:  creating new authority file /home/adefaria/.Xauthority
Adefaria-lt:ssh -X cm-app-ldev01 xclock
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth:  unable to link authority file 
/home/adefaria/.Xauthority, use /home/adefaria/.Xauthority-n

X11 connection rejected because of wrong authentication.
Error: Can't open display: localhost:12.0
Adefaria-lt:

The first ssh to cm-app-ldev01 to run xclock works fine. Do it again and 
it fails.


Ideal solution: ssh -X works with no warnings or musings about .Xauthority.

Workable solution(s): Either that ssh -X complains about .Xauthority but 
still reliably puts up X clients or I can use xhost + and export DISPLAY.

--
Andrew DeFaria
http://defaria.com


--
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 from Perl when running git add -p

2015-03-11 Thread Andrew DeFaria

On 3/11/2015 4:20 PM, James Darnley wrote:

(Now I need a different message and to remember to uncheck encryption.)

Earlier today I ran setup.exe to update Cygwin and packages.  Now when I
try to use git add -p (one of its iterative modes) I get an error from
Perl (I assume) that it cannot find Error.pm in @INC

(I should really learn to not update things)

Here's the full output:

$ git add -p
Can't locate Error.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.14 
/usr/lib/perl5/site_perl/5.14/i686-cygwin-threads-64int 
/usr/lib/perl5/vendor_perl/5.14/i686-cygwin-threads-64int 
/usr/lib/perl5/vendor_perl/5.14 /usr/lib/perl5/5.14/i686-cygwin-threads-64int 
/usr/lib/perl5/5.14 .) at /usr/lib/perl5/vendor_perl/5.14/Git.pm line 103.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.14/Git.pm 
line 103.
Compilation failed in require at /usr/libexec/git-core/git-add--interactive 
line 7.
BEGIN failed--compilation aborted at /usr/libexec/git-core/git-add--interactive 
line 7.


I have seen large changes regarding Perl on the cygwin-announce list so
perhaps it was split off into some other package.  I searched for error
in setup.exe and saw that I do have perl-Error installed.

Can anyone help me try to solve this?


Perl's debugger is your friend! With it you can use module then do 
f module and find exactly where Perl found it. For me it was:


$ perl -de 0 -MError

Loading DB routines from perl5db.pl version 1.33
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(-e:1):   0
  DB1 f Error
Choosing /usr/lib/perl5/vendor_perl/5.14/Error.pm matching `Error':
1   # Error.pm


--
Andrew DeFaria
http://defaria.com


--
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: slow startup after upgrade

2015-02-26 Thread Andrew DeFaria

On 2/25/2015 4:12 PM, Yaakov Selkowitz wrote:

On Wed, 2015-02-25 at 15:52 -0800, Andrew DeFaria wrote:

Can somebody summarize where we're at here. I've been noticing all this
email about slow startup and I'm excited by the inclusion of domain
accounts using /etc/nsswitch.conf, etc. I downloaded a newer version of
Cygwin a few weeks ago (I'm seeing 1.7.34) and I experienced the
slowdown myself. Unfortunately I'm too busy to actively participate but
it looks like some good progress has been made. Should I update or is
everything still in snapshots?


Fixes are in snapshots, as well as test releases (currently 1.7.35-0.4)
which can be installed with setup*.exe.


Hmmm... https://cygwin.com/faq-nochunks.html#faq.setup.snapshots says:

You cannot use Cygwin Setup to install a snapshot.

???
--
Andrew DeFaria
http://defaria.com


--
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: slow startup after upgrade

2015-02-26 Thread Andrew DeFaria

On 2/26/2015 2:34 PM, Corinna Vinschen wrote:

On Feb 26 14:21, Andrew DeFaria wrote:

On 2/26/2015 12:24 PM, Corinna Vinschen wrote:

On Feb 26 12:04, Andrew DeFaria wrote:

On 2/25/2015 4:12 PM, Yaakov Selkowitz wrote:

On Wed, 2015-02-25 at 15:52 -0800, Andrew DeFaria wrote:

Can somebody summarize where we're at here. I've been noticing all this
email about slow startup and I'm excited by the inclusion of domain
accounts using /etc/nsswitch.conf, etc. I downloaded a newer version of
Cygwin a few weeks ago (I'm seeing 1.7.34) and I experienced the
slowdown myself. Unfortunately I'm too busy to actively participate but
it looks like some good progress has been made. Should I update or is
everything still in snapshots?


Fixes are in snapshots, as well as test releases (currently 1.7.35-0.4)
which can be installed with setup*.exe.


Hmmm... https://cygwin.com/faq-nochunks.html#faq.setup.snapshots says:

You cannot use Cygwin Setup to install a snapshot.


Hmmm... maybe you should try to read Yaakov's entire sentence?


Corinna



It is not clear from Yaakov's sentence that the phrase which can be
installed with setup*.exe applied to test releases, snapshots or both.


So why didn't you just look for the test release in setup then?  I don't
see how complaining about the exact wording of a mail trying to be
helpful(!) does improve your situation.


Chill man! First off I wasn't complaining - I was simply pointing out

Secondly, why didn't I just install from a test release? Because like 
most of us here I have a real job and occasionally fires happen which I 
need to drop everything else and help put out. I've never installed a 
test release and though I was about to look into it, emergencies cropped 
up, alright?

--
Andrew DeFaria
http://defaria.com


--
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: slow startup after upgrade

2015-02-26 Thread Andrew DeFaria

On 2/26/2015 12:24 PM, Corinna Vinschen wrote:

On Feb 26 12:04, Andrew DeFaria wrote:

On 2/25/2015 4:12 PM, Yaakov Selkowitz wrote:

On Wed, 2015-02-25 at 15:52 -0800, Andrew DeFaria wrote:

Can somebody summarize where we're at here. I've been noticing all this
email about slow startup and I'm excited by the inclusion of domain
accounts using /etc/nsswitch.conf, etc. I downloaded a newer version of
Cygwin a few weeks ago (I'm seeing 1.7.34) and I experienced the
slowdown myself. Unfortunately I'm too busy to actively participate but
it looks like some good progress has been made. Should I update or is
everything still in snapshots?


Fixes are in snapshots, as well as test releases (currently 1.7.35-0.4)
which can be installed with setup*.exe.


Hmmm... https://cygwin.com/faq-nochunks.html#faq.setup.snapshots says:

You cannot use Cygwin Setup to install a snapshot.


Hmmm... maybe you should try to read Yaakov's entire sentence?


Corinna



It is not clear from Yaakov's sentence that the phrase which can be 
installed with setup*.exe applied to test releases, snapshots or both.

--
Andrew DeFaria
http://defaria.com


--
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: slow startup after upgrade

2015-02-25 Thread Andrew DeFaria

On 2/25/2015 2:20 PM, Roger Orr wrote:

Good work -- at least in my environment ;-)

20150225 DLL:
mkgroup 0.63s
mkpasswd 0.289s

compared to

20150220 DLL:
mkgroup 45.8s
mkpasswd: 4572.7s

Output is
  mkgroup: 53kb, 681 lines
  mkpasswd: 132kb, 1081 lines.

And the output *is* the same :-)


Can somebody summarize where we're at here. I've been noticing all this 
email about slow startup and I'm excited by the inclusion of domain 
accounts using /etc/nsswitch.conf, etc. I downloaded a newer version of 
Cygwin a few weeks ago (I'm seeing 1.7.34) and I experienced the 
slowdown myself. Unfortunately I'm too busy to actively participate but 
it looks like some good progress has been made. Should I update or is 
everything still in snapshots?


Thanks in advance.
--
Andrew DeFaria
http://defaria.com


--
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: Unable to use Mintty - Fresh Install

2014-11-21 Thread Andrew DeFaria

On 11/21/2014 10:58 AM, Warren Young wrote:

Warning: cygwin1.dll not found on your path


this is curious


It’s happening because he’s not running cygcheck under Cygwin, since Cygwin 
won’t start on his system.  Hence, c:\cygwin\bin isn’t in the path.

This is also why it skips all the package checks, and why it complains about 
things like awk not found.



You don't need mintty to run cygwin. Open a cmd prompt and do 
C:\Cygwin\bin\bash -i --login (Or wherever you installed Cygwin).

--
Andrew DeFaria
http://defaria.com


--
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: Unable to use Mintty - Fresh Install

2014-11-21 Thread Andrew DeFaria

On 11/21/2014 2:09 PM, Andrey Repin wrote:

Greetings, Andrew DeFaria!


On 11/21/2014 10:58 AM, Warren Young wrote:

Warning: cygwin1.dll not found on your path


this is curious


It’s happening because he’s not running cygcheck under Cygwin, since Cygwin 
won’t start on his system.  Hence, c:\cygwin\bin isn’t in the path.

This is also why it skips all the package checks, and why it complains about 
things like awk not found.




You don't need mintty to run cygwin. Open a cmd prompt and do
C:\Cygwin\bin\bash -i --login (Or wherever you installed Cygwin).


Don't even need a cmd prompt.
You can just start bash.


True cut if something goes wrong it's real hard to catch the error 
message before the window disappears! ;-)

--
Andrew DeFaria
http://defaria.com


--
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: /usr/local, /var and */tmp in c:\Users\Public

2014-11-12 Thread Andrew DeFaria

On 11/12/2014 2:16 PM, Warren Young wrote:

What local changes/installations get lost?


Currently, if you nuke a default installation into c:\cygwin, you lose /home, 
/etc, /var and /usr/local, all of which contain user files and/or local system 
configuration.


Technically user files can exist anywhere in the file system, including 
C:\cygwin or /etc, /var, etc., or they could be put directly into /bin, 
/usr or /usr/sbin or whatever. You're just saying that *traditionally* 
these are the areas that *smart* users limit their local changes too.


It's a nice guideline but there are no guarantees...


Apparently those of us who have been using Cygwin for years and just need to do 
a clean reinstall for some reason are expected to know enough not to take step 
4 too literally.


I've been using Cygwin since 2003 (does that qualify me?) and have never 
feel the need to reinstall. However, as a contractor I've often had the 
need to install again...

--
Andrew DeFaria
http://defaria.com


--
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 embed shell script within a .BAT file

2014-11-10 Thread Andrew DeFaria

On 11/10/2014 10:57 AM, Andrey Repin wrote:

Greetings, Nellis, Kenneth!


(CMD.EXE doesn't like UNC paths.) I hadn't realized that I could
pipe a script into bash.


reg ADD HKEY_CURRENT_USER\Software\Microsoft\Command Processor /f /v 
DisableUNCCheck /t REG_DWORD /d 1

And speaking of doesn't like, it only don't like it's own CWD to be UNC path.
You can still start programs by full UNC path from CMD.
Though, with correct settings (see above), the point is moot.


--
WBR,
Andrey Repin (anrdae...@yandex.ru) 10.11.2014, 21:56

Sorry for my terrible english...




I always thought it odd that MS invents UNC's then fails to support them 
properly in their own tools.


Try pushd on a UNC path...
--
Andrew DeFaria
http://defaria.com


--
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: RFC: 1.7.33 problem with user's home directory

2014-11-10 Thread Andrew DeFaria

On 11/10/2014 4:45 PM, Andrey Repin wrote:


I see literally zero reason to maintain separate, cygwin-specific home
directory.


My reason to have a separate, cygwin-specific home directory is to 
have one that is shared between Cygwin and Linux. Windows define home 
directories rarely are shared

--
Andrew DeFaria
http://defaria.com


--
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: perl -d causes completion to fail

2014-10-22 Thread Andrew DeFaria

On 10/22/2014 7:50 AM, Adam Dinwoodie wrote:


I've never installed any Cygwin stuff from anything other than
setup.exe.  The Cygwin mirror I typically use is
http://mirrors.kernal.org. Oddly enough, looking at it now, I see
Current as 2.1-1 and new as 1.3-1. Huh? OK... Installing new...


Cygwin Ports uses setup-*.exe for installing its packages.  It's also
currently distributing bash-completion 2.1-1, so I strongly suspect that
at some point -- intentionally or not -- you installed the Cygwin Ports
version.


If I did it was totally unintentional especially considering I don't 
know what a Cygwin Ports is though I imagine it about porting open 
source software to Cygwin and perhaps maybe a site. Are you telling me 
that http://mirrors.kernal.org is a Cygwin Ports site?


Ah dang! You're right! I recalled that setup asks for a local package 
dir and I typically keep a Cygwin folder with all of the stuff I use 
downloaded in case anybody else wants to use it locally. I recalled how 
it has directories under it with encoded URL names so I decided to check 
my repo and lo and behold there's a 
ftp%3a%2f%2fftp.cygwinports.org%2fpub%2fcygwinports%2f directory there. 
I had no idea that this Ports URL was different than any other URL in 
that list...


OK so is this bad? Should I remove it? How would I back this out?


Incidentally, almost everything in this mail trail so far could have
been skipped if you'd included `cygcheck -srv` output in your initial
email, as we'd have been able to tell straight away that you weren't
using the official Cygwin version of bash-completion.


Well now I do have 1.3-1 and I have an /etc/bash_completion.d/perl,
but it behaves the same... :-(


The next step I'd suggest is to check if the upstream bash-completion
package has the behaviour you're looking for.

If upstream does have this behaviour, you can (a) install it yourself,
separately from the Cygwin install (but be aware the list won't support
problems you hit unless/until you can identify the Cygwin-distributed
component that's causing the problem), and/or (b) request the Cygwin
bash-completion maintainer upgrade to a more recent version.

If upstream doesn't have this behaviour, I can see a bunch of options:

a) Write a plugin yourself to do it.  The obvious place to put this
would be ~/.bash_completion, which is automatically included by the
bash_completion scripts if it exists.  Optionally submit it upstream
then follow all the previous instructions about getting it included
in Cygwin.


Wow! I didn't know that bash_completion sourced ~/.bash_completion. 
That's good to know as I have written my own bash_completions - an 
extensive set that covers just about all of the Clearcase commands 
complete with smarts to complete Clearcase objects like labels, branch 
names, etc. Contact me if you want a copy.



b) Find the mailing list/equivalent for upstream and ask them to add the
feature.  See above if they actually do so.
c) Find a third-party plugin that provides this feature.  Install it
manually or ITP it and have it included in Cygwin properly.
d) Live without it.


Quite honestly option D is the best choice for me at this moment as this 
is the only thing that doesn't complete for me and I'm about to be 
hammered at work and too busy to follow up on this. Maybe later.


Damn good response though! Thanks.
--
Andrew DeFaria
http://defaria.com


--
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: perl -d causes completion to fail

2014-10-20 Thread Andrew DeFaria

On 10/20/2014 4:23 AM, Adam Dinwoodie wrote:

On Wed, Oct 15, 2014 at 03:08:42PM -0700, Andrew DeFaria wrote:

On 10/15/2014 2:30 PM, Andrew DeFaria wrote:
Adefaria-lt:ls /etc/bash_completion.d/perl
ls: cannot access /etc/bash_completion.d/perl: No such file or directory
Adefaria-lt:ls /usr/share/bash-completion/completions/perl
/usr/share/bash-completion/completions/perl
Adefaria-lt:

I think you mean /usr/share/bash-completion/completions/perl... I
think the problem is that it's parsing the next token after -d and
-dt looking for :debugger and never things that maybe there's no
debugger name (see perldoc perldebug).


Whatever you're using doesn't seem to be the Cygwin bash-completion
package.  Both x86 and x86_64 install /etc/bash_completion.d/perl:

https://cygwin.com/packages/x86/bash-completion/bash-completion-1.3-1
https://cygwin.com/packages/x86_64/bash-completion/bash-completion-1.3-1

Before we go any further with anything else, I think your next step
should probably be to install the Cygwin bash-completion package and
check what the behaviour is there.


I ran setup and I see a Keep for 2.1-1 of bash-completion. I believe 
that means it's already installed.


Additionally:

$ ls /usr/share/bash_completion.d/perl
ls: cannot access /usr/share/bash_completion.d/perl: No such file or 
directory

$ ll /usr/share/bash-completion/completions/perl
-rw-r--r-- 1 adefaria Domain Users 3569 Feb  9  2014 
/usr/share/bash-completion/completions/perl

$ cygcheck -f /usr/share/bash-completion/completions/perl
bash-completion-2.1-1
$

--
Andrew DeFaria
http://defaria.com


--
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: perl -d causes completion to fail

2014-10-20 Thread Andrew DeFaria

On 10/20/2014 1:05 PM, Ken Brown wrote:

On 10/20/2014 1:04 PM, Andrew DeFaria wrote:

On 10/20/2014 4:23 AM, Adam Dinwoodie wrote:

Whatever you're using doesn't seem to be the Cygwin bash-completion
package.  Both x86 and x86_64 install /etc/bash_completion.d/perl:

https://cygwin.com/packages/x86/bash-completion/bash-completion-1.3-1
https://cygwin.com/packages/x86_64/bash-completion/bash-completion-1.3-1

Before we go any further with anything else, I think your next step
should probably be to install the Cygwin bash-completion package and
check what the behaviour is there.


I ran setup and I see a Keep for 2.1-1 of bash-completion. I believe
that means it's already installed.


It means you installed it from some source (Cygwin Ports maybe?) other
than a Cygwin mirror.  As Adam said, Cygwin provides version 1.3-1.


I've never installed any Cygwin stuff from anything other than 
setup.exe. The Cygwin mirror I typically use is 
http://mirrors.kernal.org. Oddly enough, looking at it now, I see 
Current as 2.1-1 and new as 1.3-1. Huh? OK... Installing new...


Well now I do have 1.3-1 and I have an /etc/bash_completion.d/perl, but 
it behaves the same... :-(

--
Andrew DeFaria
http://defaria.com


--
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: perl -d causes completion to fail

2014-10-15 Thread Andrew DeFaria

On 10/15/2014 11:47 AM, Adam Dinwoodie wrote:

On Tue, Oct 14, 2014 at 04:22:20PM -0700, Andrew DeFaria wrote:

Now I did some Bash completion stuff before so I'm familiar but
where would I find which completion thing causes this to work but
only if -d was not specified?

Specify some other Perl option (i.e. -v) and it WORKS!

To recap: perl -d mysctab does NOT complete to perl -d myscript.pl
but perl -v mysctab does! That's just odd!


This is all provided by the bash-completion package.  You should be able
to download the source code using setup-*.exe as usual, or the specific
script you're after is /etc/bash_completion.d/perl.

The upstream release of bash-completion is v2.1; the official Cygwin
version seems to be based on v1.3, so it could be that this is resolved
in future releases.



Hmmm... seems my bash-completion and a few other things are old. Time to 
update (should have checked this first - sorry).

--
Andrew DeFaria
http://defaria.com


--
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: perl -d causes completion to fail

2014-10-15 Thread Andrew DeFaria

On 10/15/2014 2:30 PM, Andrew DeFaria wrote:

On 10/15/2014 11:47 AM, Adam Dinwoodie wrote:

On Tue, Oct 14, 2014 at 04:22:20PM -0700, Andrew DeFaria wrote:

Now I did some Bash completion stuff before so I'm familiar but
where would I find which completion thing causes this to work but
only if -d was not specified?

Specify some other Perl option (i.e. -v) and it WORKS!

To recap: perl -d mysctab does NOT complete to perl -d myscript.pl
but perl -v mysctab does! That's just odd!


This is all provided by the bash-completion package.  You should be able
to download the source code using setup-*.exe as usual, or the specific
script you're after is /etc/bash_completion.d/perl.

The upstream release of bash-completion is v2.1; the official Cygwin
version seems to be based on v1.3, so it could be that this is resolved
in future releases.



Hmmm... seems my bash-completion and a few other things are old. Time to
update (should have checked this first - sorry).


Adefaria-lt:ls /etc/bash_completion.d/perl
ls: cannot access /etc/bash_completion.d/perl: No such file or directory
Adefaria-lt:ls /usr/share/bash-completion/completions/perl
/usr/share/bash-completion/completions/perl
Adefaria-lt:

I think you mean /usr/share/bash-completion/completions/perl... I think 
the problem is that it's parsing the next token after -d and -dt looking 
for :debugger and never things that maybe there's no debugger name (see 
perldoc perldebug).


--
Andrew DeFaria
http://defaria.com


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



perl -d causes completion to fail

2014-10-14 Thread Andrew DeFaria
I'm a big fan of Perl and using Perl's debugger (i.e. perl -d script), 
however I noticed that Bash completion works if I say
perl scr... then tab but fails if I say perl -d scr... The script 
doesn't complete! (and no I don't mean the actual characters script 
rather the script filename).


Now I did some Bash completion stuff before so I'm familiar but where 
would I find which completion thing causes this to work but only if -d 
was not specified?


Specify some other Perl option (i.e. -v) and it WORKS!

To recap: perl -d mysctab does NOT complete to perl -d myscript.pl but 
perl -v mysctab does! That's just odd!

--
Andrew DeFaria
http://defaria.com


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



locale -uU in ~/.profile

2014-09-30 Thread Andrew DeFaria
I recently debugged this. I share my home directory from a NetApp filer 
such that I can use it from Cygwin or the various Linux machines at my 
client (largely CentOS). Recently I started seeing:


Adefaria-lt:ssh cm-db-ltest01
locale: invalid option -- 'u'
Try `locale --help' or `locale --usage' for more information.
Cm-db-test01:

Hunting this down I found that I have a ~/.profile now (didn't have one 
before) and contained therein is the following:


# Set user-defined locale
export LANG=$(locale -uU)

Turns out that on CentOS locale doesn't support -uU. Now this .profile 
came from a refreshing of Cygwin. How best to handle this...

--
Andrew DeFaria
http://defaria.com


--
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: locale -uU in ~/.profile

2014-09-30 Thread Andrew DeFaria

On 9/30/2014 1:12 PM, Eric Blake wrote:

On 09/30/2014 11:53 AM, Andrew DeFaria wrote:

I recently debugged this. I share my home directory from a NetApp filer
such that I can use it from Cygwin or the various Linux machines at my
client (largely CentOS). Recently I started seeing:

Adefaria-lt:ssh cm-db-ltest01
locale: invalid option -- 'u'
Try `locale --help' or `locale --usage' for more information.
Cm-db-test01:

Hunting this down I found that I have a ~/.profile now (didn't have one
before) and contained therein is the following:

# Set user-defined locale
export LANG=$(locale -uU)


Sounds like cygwin's base-files should be updated to guard
cygwin-specific .profile contents to only occur when uname says it is
running on cygwin.  I'm sure the maintainer would love patches...



Turns out that on CentOS locale doesn't support -uU. Now this .profile
came from a refreshing of Cygwin. How best to handle this...


You can guard that with something as simple as:

case $(uname) in
   CYGWIN*) export LANG=$(locale -uU) ;;
esac

(hmm, the moment you also share the .profile with a Solaris box, you'd
have to use `` instead of $(), but that's another story)



Is Solaris still that backward?!? I haven't been on a Solaris box for 
quite some time. Life's been good...

--
Andrew DeFaria
http://defaria.com


--
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: No file name completion for file names start with underscore

2014-09-18 Thread Andrew DeFaria

On 9/18/2014 11:42 AM, David Boyce wrote:

The path argument to find must be a directory.


Sorry, but I can't let this go by. The statement above is incorrect,
as a simple test like find /etc/passwd -print would show.


Or just find /etc/passwd. (-print has been the default for decades... 
The man page it's the default but you should proob)

--
Andrew DeFaria
http://defaria.com


--
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: About cygstart in Cygwin64

2014-08-26 Thread Andrew DeFaria

On 8/26/2014 3:24 AM, Angelo Graziosi wrote:

When I had WinXP32 and Cygwin32, I defined an alias (in .bashrc) like this

   alias cygstart='TEMP=/home/$USER/Temp cygstart'

where /home/$USER/Temp was a symlink to the user native Temp directory
(/cygdrive/c/Documents and Setting/Local/Temp, if I remember..)


Here's what I do - use Cygwin's tmp (i.e. /tmp in Cygwin and 
C:\Cygwin\tmp for Windows). Then change the TEMP and TMP environment 
variables to point to C:\Cygwin\tmp. Then simply think of temp as /tmp.




The reasons for that alias with TEMP=/home.. in front, were that,
opening documents with Windows native applications (for example, a PDF
with AR), all temporary files that those applications created were saved
in the Windows native Temp directory. And all this worked..

Now with Win7U and Cygwin64 I defined a similar alias, being
/home/$USER/Temp the symlink

   /home/$USER/Temp -- /cygdrive/c/$USER/AppData/Local/Temp

In this case, all temporary files created by Windows native
applications, started with cygstart, go in /tmp Cygwin directory.., i.e.
the definition TEMP=/home/$USER/Temp in front of cygstart command is
ignored..

This is a minor issue but I wonder if there is a way to avoid it.


Any self respecting Windows app should honor either $TMP or $TEMP. Non 
self respecting Windows apps should be uninstalled ;-)

--
Andrew DeFaria
http://defaria.com


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

2014-08-21 Thread Andrew DeFaria

On 8/21/2014 7:25 AM, Andrey Repin wrote:

Greetings, Cary Lewis!


I have created a small shell script that acts like a network
connectivity watchdog, which checks for a successful ping to the
internet, and if it doesn't work, restarts the machine.



When I attempt to run it from a cron job, the script exits whenever
any of the commands exits with a non zero status, preventing the
script from doing its job.



Has anyone seen this behaviour before?



I have tried wrapping the script in () to run it within a sub-shell,
but to no avail.


man bash
You have to disable abort-on-error in your script.


--
WBR,
Andrey Repin (anrdae...@yandex.ru) 21.08.2014, 18:24

Sorry for my terrible english...




$ man bash | grep abort
   Control-G  will  abort  an  incremental search and restore the 
original

   abort (C-g)

It might be better if your searched for errexit.

--
Andrew DeFaria
http://defaria.com


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

2014-08-06 Thread Andrew DeFaria

On 8/6/2014 3:08 AM, Warren Young wrote:

On Aug 6, 2014, at 3:59 AM, Kal Sze swordan...@gmail.com wrote:

A Software Engineer, a Hardware Engineer and a Departmental Manager were on 
their way to a meeting. They were driving down a steep mountain road when 
suddenly the brakes on their car failed. The car careened almost out of control 
down the road, bouncing off the crash barriers, until it miraculously ground to 
a halt scraping along the mountainside. The car's occupants, shaken but unhurt, 
now had a problem: they were stuck halfway down a mountain in a car with no 
brakes. What were they to do?

I know, said the Departmental Manager, Let's have a meeting, propose a Vision, 
formulate a Mission Statement, define some Goals, and by a process of Continuous Improvement find a 
solution to the Critical Problems, and we can be on our way.

No, no, said the Hardware Engineer, That will take far too long, and besides, 
that method has never worked before. I've got my Swiss Army knife with me, and in no time at all I 
can strip down the car's braking system, isolate the fault, fix it, and we can be on our way.

Well, said the Software Engineer, Before we do anything, I think we should 
push the car back up the road and see if it happens again.”




Source: http://www.workjoke.com/programmers-jokes.html


A similar one that I heard (when I was at HP, of course):

An HP Hardware Engineer, Software Engineer and an HP Salesman were 
driving to a meeting when the car got a flat. They jumped out of the car 
to see what could be done. The hardware engineer says I know what we 
can do - we can rotate the tires!. No, said the software engineer, 
we should call back to the office and see if anybody has had this 
problem before. Then the sales rep pipes up and says Naw, we'll just 
call the office and order a new car!

--
Andrew DeFaria
http://defaria.com


--
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: Basic question about cygport

2014-08-05 Thread Andrew DeFaria

On 8/4/2014 8:41 PM, Doug Henderson wrote:

On Mon, Aug 4, 2014 at 9:17 PM, Andrew DeFaria  wrote:

On 8/4/2014 7:52 PM, Larry Hall (Cygwin) wrote:


Thankfully, the rough attitude
is not held by everyone, though it sometimes has been seen in people who
carry platinum watches - and that might encourage its continuation...



I like platinum watches.  Platinum watches are friends of mine.  You sir,
are no platinum watch.

:-D

(I'm afraid I'm dating myself with my artist's interpretation of this
   quote -

http://en.wikipedia.org/wiki/Senator,_you%27re_no_Jack_Kennedy#Transcript).



What's a watch? ;-)


See https://cygwin.com/goldstars/ where gold stars, gold watches and a
platinum watch are awarded to distinguished contributors to the cygwin
project. Without the contribution of these folks, this community would
be a much poorer place.


Sorry I was making a joke about the fact that many people don't wear 
watches at all anymore.


Move along... Nothing to see here...
--
Andrew DeFaria
http://defaria.com


--
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: Basic question about cygport

2014-08-04 Thread Andrew DeFaria

On 8/4/2014 7:52 PM, Larry Hall (Cygwin) wrote:


Thankfully, the rough attitude
is not held by everyone, though it sometimes has been seen in people who
carry platinum watches - and that might encourage its continuation...


I like platinum watches.  Platinum watches are friends of mine.  You sir,
are no platinum watch.

:-D

(I'm afraid I'm dating myself with my artist's interpretation of this
  quote -
http://en.wikipedia.org/wiki/Senator,_you%27re_no_Jack_Kennedy#Transcript).

snip



--
Andrew DeFaria
http://defaria.com


--
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: Basic question about cygport

2014-08-04 Thread Andrew DeFaria

On 8/4/2014 7:52 PM, Larry Hall (Cygwin) wrote:


Thankfully, the rough attitude
is not held by everyone, though it sometimes has been seen in people who
carry platinum watches - and that might encourage its continuation...


I like platinum watches.  Platinum watches are friends of mine.  You sir,
are no platinum watch.

:-D

(I'm afraid I'm dating myself with my artist's interpretation of this
  quote -
http://en.wikipedia.org/wiki/Senator,_you%27re_no_Jack_Kennedy#Transcript).


What's a watch? ;-)
--
Andrew DeFaria
http://defaria.com


--
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: Simplify AD integration?

2014-08-01 Thread Andrew DeFaria

On 8/1/2014 5:28 AM, D. Boland wrote:

Andrey Repin wrote:


Greetings, D. Boland!


I am not only a man of legacy, but also a very opinionated one. So give me some
slack when I say: the whole thing is insane. This would mean that from now on, I
have to use constructs like ~+daniel ~+SYSTEM in a Linux shell?? Bizarre.


No, you don't have. Default domain users are unprefixed, and the chance you
would use internal accounts for something like shell access is exactly zero.

For the god's sake, read the thread before posting into it. Everything has
been discussed no more than two days ago.


Yes, yes, I know. I wanted to react from the heart, without the intellectual 
baggage
of knowing the technical intricacies behind the problem.

D.


Yes, who wants the facts to get in the way of a good emotion! ;-)
--
Andrew DeFaria
http://defaria.com


--
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: Withdrawing from the project

2014-08-01 Thread Andrew DeFaria

On 7/31/2014 11:49 PM, Linda Walsh wrote:

Christopher Faylor wrote:

I'll be unsubscribing from all cygwin mailing lists right after sending
this.  I'll likely continue to use Cygwin but just as a user.


Dang... you probably won't see all the goodbyes...
But in case... best wishes in your new endeavor. Your efforts here were
very much appreciated.

Linda Walsh


Indeed! Thanks for all your hard work and patience. I just wished that I 
could have persuaded you and Corinna to get on the FLOSS weekly podcast...

--
Andrew DeFaria
http://defaria.com


--
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: Simplify AD integration?

2014-07-30 Thread Andrew DeFaria

On 7/30/2014 6:47 AM, Corinna Vinschen wrote:

I have not been actively watching this thread but if I'm correct we're 
adding NIS like capabilities to Cygwin so that /etc/passwd can easily be 
filled with say everybody in the domain? If so then bravo!


I also take it that it's not ready yet either. When it is, how would I 
install it?



So I'd like to ask a few questions to which I'd like to have some brief
answers, kind of like a poll, to get a better idea how we should
proceed:

1. Shall we remove the leading '+' from the builtin account names
or shall we keep it?

2. Shall we stick to '+' as the separator char or choose another one?
If so, which one?


How about @?


3. Shall we keep the `db_prefix' variability or choose one of
the prefixing methods and stick to it?  If so, which one, auto,
primary, or always?

Bonus question:

4. Should Cygwin downcase all usernames when generating the Cygwin
username, so, if your Windows username is 'Ralph', your Cygwin
username will be 'ralph'?


I say downshift them!
--
Andrew DeFaria
http://defaria.com


--
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: Simplify AD integration?

2014-07-30 Thread Andrew DeFaria

On 7/30/2014 11:40 AM, Corinna Vinschen wrote:

On Jul 30 11:15, Andrew DeFaria wrote:

On 7/30/2014 6:47 AM, Corinna Vinschen wrote:



When it is, how would I
install it?


The existing code is in almost all developer snapshots of the last few
months.  Just try the last one from http://cygwin.com/snapshots/ and
read my preliminary documentation attached to this mail again (and
which, incidentally, is now in the offical docs in the repo as well).


I guess I was just curious as to what the package name might be... NIS? 
AD or ActiveDirectory or CygwinUserIntegration...



How about @?


Dunno.  It *might* be a good alternative to '+'.  Personally I just
dislike that a '@' is a less light character and it might give a wrong
idea.  Email:  name AT domain.  Cygwin account:  domain AT name.


Yeah I wish we could switch it to name@domain...
--
Andrew DeFaria
http://defaria.com


--
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: Simplify AD integration?

2014-07-30 Thread Andrew DeFaria

On 7/30/2014 1:48 PM, Larry Hall (Cygwin) wrote:

On 07/30/2014 04:04 PM, Andrew DeFaria wrote:

On 7/30/2014 11:40 AM, Corinna Vinschen wrote:

On Jul 30 11:15, Andrew DeFaria wrote:

On 7/30/2014 6:47 AM, Corinna Vinschen wrote:



When it is, how would I
install it?


The existing code is in almost all developer snapshots of the last few
months.  Just try the last one from http://cygwin.com/snapshots/ and
read my preliminary documentation attached to this mail again (and
which, incidentally, is now in the offical docs in the repo as well).


I guess I was just curious as to what the package name might be...
NIS? AD
or ActiveDirectory or CygwinUserIntegration...


The implementation is part of the Cygwin DLL so it lives in the cygwin
package.  That's why Corinna was directing you towards the Cygwin snapshots
page.


Ah yes. That makes sense I guess. But does this mean that things will 
come in with the base package like /etc/nsswitch.conf, etc?

--
Andrew DeFaria
http://defaria.com


--
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: Trusted vs untrusted ssh/X connections

2014-06-20 Thread Andrew DeFaria

On 6/19/2014 7:37 PM, Larry Hall (Cygwin) wrote:

On 06/19/2014 04:25 PM, Andrew DeFaria wrote:

This is something that's been bothering me for a long time and I
thought I
might look into it a little deeper. I'm not sure if I should post this
here
because it involves Cygwin/X but it also involves OpenSSh.


Actually, this is probably off-topic since I don't see anything Cygwin-
specific about setting up ssh/X connections.


But I get the untrusted X11 forwarding error only when I ssh from 
Cygwin - Linux using -X.





When I ssh into a Linux machine using ForwardX11 I get those familiar
messages:

Warning: untrusted X11 forwarding setup failed: xauth key data not
generated

and according to
https://cygwin.com/ml/cygwin-xfree/2008-11/msg00154.html:
The warning can be silenced by using ssh -Y, since that
is what ssh -X is doing now anyway.

However, I find -Y to be 20 times slower to log in than -X:


This is probably a configuraton issue since when I ssh into my Linux
system,
login time is roughly equivalent.


Any ideas of what configuration file I should be looking and what that 
configuration option that would be?





Adefaria-lt:time ssh cm-job-ldev01 echo 'hi'
Warning: untrusted X11 forwarding setup failed: xauth key data not
generated
Warning: No xauth data; using fake authentication data for X11
forwarding.
/usr/bin/xauth:  error in locking authority file
/home/adefaria/.Xauthority
hi

real0m2.387s
user0m0.075s
sys 0m0.446s
Adefaria-lt:time ssh -Y cm-job-ldev01 echo 'hi'
Warning: No xauth data; using fake authentication data for X11
forwarding.
hi
/usr/bin/xauth:  error in locking authority file
/home/adefaria/.Xauthority

real0m22.476s
user0m0.091s
sys 0m0.477s
Adefaria-lt:

Bonus points if you can help me get right of the other errors!


I believe the error regarding the .Xauthority file has something to do with
the permissions on the file.  As for the warning, I believe you want to
unset DISPLAY on your PC, set X11Forwarding to yes on your Linux machine
in your sshd_config file, and X11Forward to yes in you ssh_config file
(for instance) on your PC.  At least, that's what I gathered from searching
around on the net for the information. :-)


My experience with this is that if DISPLAY is not set and you ssh -X (or 
-Y) then on the other side DISPLAY is not set:


Adefaria-lt:echo $DISPLAY
:0
Adefaria-lt:ssh cm-job-ldev01 'echo $DISPLAY'
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth:  error in locking authority file /home/adefaria/.Xauthority
localhost:11.0
Adefaria-lt:unset DISPLAY
Adefaria-lt:ssh cm-job-ldev01 'echo $DISPLAY'

Adefaria-lt:


I think it goes without saying that enabling X11Forwarding opens up
some security holes in X.  Oops, looks like I said it anyway. ;-)


Inside the intranet, this is not a concern for me.
--
Andrew DeFaria
http://defaria.com


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



Trusted vs untrusted ssh/X connections

2014-06-19 Thread Andrew DeFaria
This is something that's been bothering me for a long time and I thought 
I might look into it a little deeper. I'm not sure if I should post this 
here because it involves Cygwin/X but it also involves OpenSSh.


When I ssh into a Linux machine using ForwardX11 I get those familiar 
messages:


Warning: untrusted X11 forwarding setup failed: xauth key data not generated

and according to 
https://cygwin.com/ml/cygwin-xfree/2008-11/msg00154.html: The warning 
can be silenced by using ssh -Y, since that

is what ssh -X is doing now anyway.

However, I find -Y to be 20 times slower to log in than -X:

Adefaria-lt:time ssh cm-job-ldev01 echo 'hi'
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Warning: No xauth data; using fake authentication data for X11 forwarding.
/usr/bin/xauth:  error in locking authority file /home/adefaria/.Xauthority
hi

real0m2.387s
user0m0.075s
sys 0m0.446s
Adefaria-lt:time ssh -Y cm-job-ldev01 echo 'hi'
Warning: No xauth data; using fake authentication data for X11 forwarding.
hi
/usr/bin/xauth:  error in locking authority file /home/adefaria/.Xauthority

real0m22.476s
user0m0.091s
sys 0m0.477s
Adefaria-lt:

Bonus points if you can help me get right of the other errors!
--
Andrew DeFaria
http://defaria.com


--
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: Building cpan module that links with proprietary libs

2014-05-30 Thread Andrew DeFaria

On 5/30/2014 1:01 AM, Csaba Raduly wrote:

On Fri, May 30, 2014 at 4:36 AM, Andrew DeFaria  wrote:

On 5/29/2014 6:42 PM, Larry Hall (Cygwin) wrote:

As a
result, you will never get code compiled with g++ to link with these
libraries.  There is no common ABI among C++ compilers.  Thus, the
libraries
and headers of one can't be used as input to the compiler of another, even
on the same platform.  This only works for C code.  So you have to either
build the proprietary libs with Cygwin's C++ compiler or write your own
shim library that wraps the necessary calls and objects in a C API,
compile that with VS, and link your program against the APIs in your
library.


@Larry: Would this work? I think MSVC produces obj and lib files in
COFF; can Cygwin's toolchain understand that?



Being as this code is proprietary I doubt that Perforce will release it to
me to compile but I will point them at this thread...'


Maybe you can convince them to build a Cygwin version (not very likely).


I am in contact with Perforce about this. They think it's a wonderful 
idea and they fully want me to let them know when I've managed to 
accomplish this! ;-)


Needless to say, Cygwin, it's Perl and having a P4Perl available for it 
is not necessarily in Perforce's business model. Most people just use 
ActiveState. That said, with 5.18 I hear the backend moves to gcc and 
they need to address that issue. Once addressed having a Cygwin version 
may be easier for them to produce.


I, unfortunately, do not have a lot of time to dedicate to this as my 
client wants me to work on others things. Using Cygwin's Perl is a 
convenience for me but not a necessity, though I would love to have this 
working.

--
Andrew DeFaria
http://defaria.com


--
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: Building cpan module that links with proprietary libs

2014-05-29 Thread Andrew DeFaria

On 5/29/2014 1:29 AM, Csaba Raduly wrote:

Hi Andrew,

On Thu, May 29, 2014 at 4:12 AM, Andrew DeFaria  wrote:

I'm attempting to build a cpan module (well actually it's not a cpan module
but rather a module that uses MakeMaker and has the familiar perl
Makefile.PL, make, make test, make install installation procedure.
Additionally I need to link it to a set of proprietary libs that I am given
only the .lib files for. If you must know this is for Perforce's P4Perl
which I'd like to get working with Cygwin's Perl natively.

I download the P4API bundle (the package that has include files and the .lib
files pre-compiled).


The C++ P4 API is platform-specific; which platform did you choose?
If it really contains .lib files (not .a), those are not recognized by
Cygwin's gcc.


I had two archives two choose from. One was for Windows and contained 
the .lib files. The other was for Linux and contains .a files. I first 
tried the Linux one but that failed with:


g++  -shared P4.o  -o blib/arch/auto/P4/P4.dll lib/libp4.a  \
  /usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/cygperl5_14.dll 
-L/cygdrive/a/p4perlBuild/p4api/lib -lclient -lrpc -lsupp -lp4sslstub 
   \


collect2: error: ld terminated with signal 11 [Segmentation fault], core 
dumped

Makefile:531: recipe for target 'blib/arch/auto/P4/P4.dll' failed
make: *** [blib/arch/auto/P4/P4.dll] Error 1
Adefaria-lt:

I can give you more output if you need it.

Then I switched to the Windows archive that contained the .lib files.

I think the issue is that their Windows P4Perl build system uses Visual 
Studio to build and on Linux it uses g++. Their installation package is 
only for ActiveState. Supposedly at 5.18 ActiveState is changing to a 
g++ based backend using MingW I think so they'll eventually have to 
figure this out. Meantime I'm just trying to get it working under 
Cygwin's Perl...



Next I need to do:

$ perl Makefile.PL --api-dir /.../path/to/unzipped/p4api

This works fine and I procedure with the make. This fails with things like:

make[1]: Leaving directory '/cygdrive/a/perl/P4Perl.Cygwin/lib'
g++ -c  -I/cygdrive/a/perl/p4api.windows/include/p4 -Ilib -x c++
-DUSEIMPORTLIB -O3   -DVERSION=\2014.1\ -DXS_VERSION=\2014.1\
-I/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE
-DID_OS=\CYGWIN17THREAD\ -DID_REL=\2014.1\ -DID_PATCH=\842847\
-DID_Y=\2014\ -DID_M=\05\ -DID_D=\06\ -DOS_CYGWIN -DOS_CYGWIN17
-DOS_CYGWIN17THREAD -DOS_CYGWINTHREAD -DP4API_VERSION=515585
-DID_API=\2014.1/821990\ P4.c
Running Mkbootstrap for P4 ()
chmod 644 P4.bs
rm -f blib/arch/auto/P4/P4.dll
g++  -shared P4.o  -o blib/arch/auto/P4/P4.dll lib/libp4.a  \
   /usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/cygperl5_14.dll\

P4.o:P4.c:(.text+0x45ac): undefined reference to `ClientApi::SetClient(char
const*)'
P4.o:P4.c:(.text+0x45ac): relocation truncated to fit: R_X86_64_PC32 against
undefined symbol `ClientApi::SetClient(char const*)'
P4.o:P4.c:(.text+0x4a9c): undefined reference to `ClientApi::SetHost(char
const*)'

Notice that it removes P4.dll, so it seems to know it's working with dll's,
but then it calls g++ with a -o for libp4.a!


No it doesn't. The argument to -o is blib/arch/auto/P4/P4.dll
lib/libp4.a is the next input file.


Good catch! I missed that.

 What does the following say?


nm lib/libp4.a | c++filt


Attached.


Meantime it fails with many undefined references. I think I might need to do
perl Makefile.PL with other opts to tell it that while it's using Cygwin and
can be very Linux-like, it needs to produce .dll's and not .a's or .o's.


It seems to be on the right track; g++ -shared -o P4.dll sounds good to me.


Thanks for your help.
--
Andrew DeFaria
http://defaria.com

p4actionmerge.o:
 b .bss
 d .data
 p .pdata
 r .rdata
 r .rdata$.refptr._ZN6StrBuf10nullStrBufE
 r .rdata$zzz
 R .refptr._ZN6StrBuf10nullStrBufE
 t .text
 r .xdata
 U Perl_newSVpv
 U _Unwind_Resume
0350 T P4ActionMergeData::GetMergeHint()
0080 T P4ActionMergeData::GetMergeInfo()
0140 T P4ActionMergeData::GetYourAction()
0090 T P4ActionMergeData::GetMergeAction()
01f0 T P4ActionMergeData::GetTheirAction()
02a0 T P4ActionMergeData::GetType()
0380 T P4ActionMergeData::GetString()
 T P4ActionMergeData::P4ActionMergeData(ClientUser*, 
ClientResolveA*, StrPtr, sv*)
 T P4ActionMergeData::P4ActionMergeData(ClientUser*, 
ClientResolveA*, StrPtr, sv*)
 U StrBuf::nullStrBuf
 U StrBuf::Append(StrPtr const*)
 U StrBuf::Append(char const*)
 U Error::Fmt(StrBuf, int) const
 U operator delete[](void*)
 U __gxx_personality_seh0
 U __imp_PL_thr_key
 U __real__ZdaPv

Re: Building cpan module that links with proprietary libs

2014-05-29 Thread Andrew DeFaria

On 5/29/2014 6:42 PM, Larry Hall (Cygwin) wrote:


I had two archives two choose from. One was for Windows and contained the
.lib files. The other was for Linux and contains .a files. I first
tried the
Linux one but that failed with:

g++  -shared P4.o  -o blib/arch/auto/P4/P4.dll lib/libp4.a  \
   /usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/cygperl5_14.dll
-L/cygdrive/a/p4perlBuild/p4api/lib -lclient -lrpc -lsupp
-lp4sslstub\

collect2: error: ld terminated with signal 11 [Segmentation fault],
core dumped
Makefile:531: recipe for target 'blib/arch/auto/P4/P4.dll' failed
make: *** [blib/arch/auto/P4/P4.dll] Error 1
Adefaria-lt:

I can give you more output if you need it.


No need.  Forgive me for saying this but I find it hard to believe that
after all this time on the list Andrew that you don't know that trying to
use Linux-compiled libraries on Cygwin isn't going to work.  But I guess
my surprise is not that important here. ;-)


When I first when to get this to work I choose the Linux style of the 
package for p4api. I figured the Windows style was for ActiveState only 
and that'd probably not work. Hell ActiveState doesn't even use cpan, 
they use ppm. I didn't look inside for anything like .o, .a or .dll or 
.lib. I figured that it would have been source code and it would have 
been compiled as part of the make process. It wasn't until it failed 
that I saw the reference to .a's, etc. and looked into the p4api 
directory structure to see .lib's in the Windows copy and .a's in the 
Linux copy. Sure at *that* point I knew the Linux style will never work 
in this situation. So I tried to link with the Windows style .lib copy.



It seems to be on the right track; g++ -shared -o P4.dll sounds
good to me.


You say that the libs were built by Visual Studio and the remainder of your
comments make it clear that the libraries are C++ and not C code.


I don't believe I ever said it was just C code. If I did then I'm sorry.


As a
result, you will never get code compiled with g++ to link with these
libraries.  There is no common ABI among C++ compilers.  Thus, the
libraries
and headers of one can't be used as input to the compiler of another, even
on the same platform.  This only works for C code.  So you have to either
build the proprietary libs with Cygwin's C++ compiler or write your own
shim library that wraps the necessary calls and objects in a C API,
compile that with VS, and link your program against the APIs in your
library.


Being as this code is proprietary I doubt that Perforce will release it 
to me to compile but I will point them at this thread...'


Thanks.
--
Andrew DeFaria
http://defaria.com


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



Building cpan module that links with proprietary libs

2014-05-28 Thread Andrew DeFaria
I'm attempting to build a cpan module (well actually it's not a cpan 
module but rather a module that uses MakeMaker and has the familiar perl 
Makefile.PL, make, make test, make install installation procedure. 
Additionally I need to link it to a set of proprietary libs that I am 
given only the .lib files for. If you must know this is for Perforce's 
P4Perl which I'd like to get working with Cygwin's Perl natively.


I download the P4API bundle (the package that has include files and the 
.lib files pre-compiled). Next I need to do:


$ perl Makefile.PL --api-dir /.../path/to/unzipped/p4api

This works fine and I procedure with the make. This fails with things like:

make[1]: Leaving directory '/cygdrive/a/perl/P4Perl.Cygwin/lib'
g++ -c  -I/cygdrive/a/perl/p4api.windows/include/p4 -Ilib -x c++ 
-DUSEIMPORTLIB -O3   -DVERSION=\2014.1\ -DXS_VERSION=\2014.1\ 
-I/usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE 
-DID_OS=\CYGWIN17THREAD\ -DID_REL=\2014.1\ 
-DID_PATCH=\842847\ -DID_Y=\2014\ -DID_M=\05\ 
-DID_D=\06\ -DOS_CYGWIN -DOS_CYGWIN17 -DOS_CYGWIN17THREAD 
-DOS_CYGWINTHREAD -DP4API_VERSION=515585 -DID_API=\2014.1/821990\ P4.c

Running Mkbootstrap for P4 ()
chmod 644 P4.bs
rm -f blib/arch/auto/P4/P4.dll
g++  -shared P4.o  -o blib/arch/auto/P4/P4.dll lib/libp4.a  \
  /usr/lib/perl5/5.14/x86_64-cygwin-threads/CORE/cygperl5_14.dll\

P4.o:P4.c:(.text+0x45ac): undefined reference to 
`ClientApi::SetClient(char const*)'
P4.o:P4.c:(.text+0x45ac): relocation truncated to fit: R_X86_64_PC32 
against undefined symbol `ClientApi::SetClient(char const*)'
P4.o:P4.c:(.text+0x4a9c): undefined reference to 
`ClientApi::SetHost(char const*)'


Notice that it removes P4.dll, so it seems to know it's working with 
dll's, but then it calls g++ with a -o for libp4.a! Why a .a? Shouldn't 
this be .dll?


Meantime it fails with many undefined references. I think I might need 
to do perl Makefile.PL with other opts to tell it that while it's using 
Cygwin and can be very Linux-like, it needs to produce .dll's and not 
.a's or .o's.


Has anybody managed to do this? What am I doing wrong?
--
Andrew DeFaria
http://defaria.com


--
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: Enquiry on Cygwin function - file sharing between Windows and Windows

2014-05-09 Thread Andrew DeFaria

On 5/9/2014 2:33 AM, Marco Atzeri wrote:

On 09/05/2014 11:07, Marco Lau wrote:

Dear Cygwin,

Further to FAQ 4.28, we know that Cygwin can provide a SCP protocol
for file sharing between Unix and Windows and we have been using this
tool for years.

My question is, can we do the same thing for file sharing between
Windows and Windows?

I know there are huge number of sftp applications can serve for the
purpose but I am really interested can Cygwin support file sharing
between Windows Servers platform.

Thanks  regards,
Marco



yes ,
of course as with Unix you need to install and run the ssh server.


Which, luckily, comes with Cygwin! Yes install the OpenSSH package in 
Cygwin and Cygwin with OpenSSH and on the remote Windows server. Run 
ssh-host-config to set up the service and scp (or sftp) to your heart's 
content...

--
Andrew DeFaria
http://defaria.com


--
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: Setting up Apache2 with mod_perl and Apache2::AuthCookieLDAP

2014-05-07 Thread Andrew DeFaria

On 5/7/2014 6:23 AM, Andrey Repin wrote:

Goal: Set up Apache2 on my Windows laptop with mod_perl working as well
as Apache2::AuthCookieLDAP and write an example login page that
authenticates to Active Directory using AuthCookieLDAP.


Little bit OT: Is this necessary to set up Cygwin Apache/Perl?


I view my development environment as Linux. When I don't have bona 
fide Linux at my fingertips and they shove a Windows box under my 
keyboard I rely on Cygwin to provide a Linux-like environment. True 
it's not strictly necessary to set up a Cygwin Apache/Perl but it is 
what I'm best familiar and comfortable with.



First problem (minor): I can't figure out how to install Apache2 as a
Windows service. For now I can just do apachectl2 start but would like
to configure it as a real service. I've tried:



Adefaria-lt:cygrunsrv -I httpd2 -d 'CYGWIN Apache2' -p
/usr/sbin/httpd2.exe -a '-DNO_DETACH'
Adefaria-lt:net start httpd2
The CYGWIN Apache2 service is starting.
The CYGWIN Apache2 service could not be started.



The service did not report an error.


What's in Apache logs?


Nothing!


I suspect Apache was running at the time.


I just checked. Shut down Apache. Cleared the logfiles. Did net start 
httpd2. Errored out. Checked the logs - they're empty.



Adefaria-lt:grep -i 'addhandler cgi-script' /etc/apache2/httpd.conf
  AddHandler cgi-script .cgi .pl
Adefaria-lt:cat ~/web/test.pl
#!/usr/bin/perl


It is long (like, 10-15 years long) since recommended to use filters instead
of handlers.
I.e.
AddOutputFilter Perl .pl
AddInputFilter Perl .pl


I've always just used the handler.


print Content-type: text/html\n\n;


print Content-type: text/html\r\n\r\n;

Read http://tools.ietf.org/html/rfc2616#section-4 pretty please.


Normally I use CGI and call start_html. This script I just grabbed off 
the net as a simple test. Note that LF works just find and CRLF does not 
seem to be required.

--
Andrew DeFaria
http://defaria.com


--
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: Setting up Apache2 with mod_perl and Apache2::AuthCookieLDAP

2014-05-07 Thread Andrew DeFaria

On 5/7/2014 6:33 AM, Andrey Repin wrote:

Greetings, Andrew DeFaria!


Hey guys! I missed you! :-)


Personally I prefer Cygwin Apache because all of the pathing then can be
POSIX-like and can easily port to Linux systems later on. Plus Cygwin's
Perl is, IMHO, far superior to ActiveState.


Then use Cygwin Perl! And it is THAT part of your setup that needs to be aware
of Cygwin's POSIX'y paths. Apache can be just told where to find Perl, and
that's all.


That's what I'm doing...


However I had set up Apache2 as a Windows service before so I know it's
doable. I just forget how to do it! ;-) I thought it was just to specify
-k or perhaps -DNO_DETACH or something like that...


httpd --help
?
(I honestly don't remember myself, it is long since I moved all my server
stuff to Linux, and forgot about it.)


Same here! http2 --help does exactly nothing AFAICT!
--
Andrew DeFaria
http://defaria.com


--
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: Setting up Apache2 with mod_perl and Apache2::AuthCookieLDAP

2014-05-07 Thread Andrew DeFaria
First off, David Habermann, you really should respond to the list 
instead of emailing me directly so that others can benefit. Dave wrote:


If you are using a Cygwin based Apache then it will follow symlinks=20
whereas my experience with the Windows based Apache it doesn't.

Although not a popular opinion, I agree with you.  Cygwin based Apache works
and has a number of desirable properties.


 However I had set up Apache2 as a Windows service before so I know it's
 doable. I just forget how to do it! ;-) I thought it was just to specify
 -k or perhaps -DNO_DETACH or something like that...

I just went through the configs and it (httpd2-config) asked if I wanted to=
 create a service,
I said yes and was all set.=20=20
/bin/cygserver-config (cygserver is apparently required)
/usr/sbin/httpd2-config

Hope this helped.
--

Yes it did! It's been a long time and in the meantime somebody made 
/usr/sbin/httpd2-config which sets up the service nicely.


On 5/7/2014 12:13 PM, Andrew DeFaria wrote:

On 5/7/2014 6:23 AM, Andrey Repin wrote:

Goal: Set up Apache2 on my Windows laptop with mod_perl working as well
as Apache2::AuthCookieLDAP and write an example login page that
authenticates to Active Directory using AuthCookieLDAP.


Little bit OT: Is this necessary to set up Cygwin Apache/Perl?


I view my development environment as Linux. When I don't have bona
fide Linux at my fingertips and they shove a Windows box under my
keyboard I rely on Cygwin to provide a Linux-like environment. True
it's not strictly necessary to set up a Cygwin Apache/Perl but it is
what I'm best familiar and comfortable with.


First problem (minor): I can't figure out how to install Apache2 as a
Windows service. For now I can just do apachectl2 start but would like
to configure it as a real service. I've tried:



Adefaria-lt:cygrunsrv -I httpd2 -d 'CYGWIN Apache2' -p
/usr/sbin/httpd2.exe -a '-DNO_DETACH'
Adefaria-lt:net start httpd2
The CYGWIN Apache2 service is starting.
The CYGWIN Apache2 service could not be started.



The service did not report an error.


What's in Apache logs?


Nothing!


Let me restate. The problem is there are too many log files! There's 
/var/log/apache2/[error|access]_log (which shows nothing) and 
/var/log/apache2.log (which also shows nothing) but then there's 
/var/log/httpd2.log which shows:


Syntax error on line 172 of /etc/apache2/httpd.conf:
DocumentRoot must be a directory

My DocumentRoot was /cygdrive/a/web because I mound my home directory 
from a NetApp (I believe) to my (unused) A drive. I assure you that 
web is a directory in my home directory. I've also tried the following 
but all failed:


DocumentRoot a:/web
DocumentRoot //server/share/adefaria/web
DocumentRoot /home/adefaria/web # where /home/adefaria is a symlink A:

Then I created a local /web directory and moved stuff there and 
restarted. Now in the error_log I see:


[Wed May 07 12:49:48 2014] [error] (28)No space left on device: Cannot 
create SSLMutex Configuration Failed


My disks are not full. The only reference I see to this is 
http://www.cygwin.com/ml/cygwin/2010-01/msg01017.html which doesn't 
point to an eventual answer. Other googling talks only about Linux 
systems and how to remove semaphores but none of the semaphores are 
owned by the Apache user. Used ipcrm -s semid to remove all of them. 
Now Apache starts!

--
Andrew DeFaria
http://defaria.com


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



Newer version of Perl?

2014-05-07 Thread Andrew DeFaria
Apologies if this has been asked before. What the latest version of Perl 
available for Cygwin. I see 5.14 but I know that 5.16 and 5.18 are out.

--
Andrew DeFaria
http://defaria.com


--
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: Newer version of Perl?

2014-05-07 Thread Andrew DeFaria

On 5/7/2014 5:17 PM, Warren Young wrote:

On 5/7/2014 16:10, Andrew DeFaria wrote:

Apologies if this has been asked before.


Actually, I brought it up here yesterday, as a result of trying to help
you with mod_perl alternatives:

 http://cygwin.com/ml/cygwin/2014-05/msg00113.html


What the latest version of Perl
available for Cygwin. I see 5.14 but I know that 5.16 and 5.18 are out.


5.18.2 is in test.  Run setup.exe, find perl on the Select Packages
screen, then click the 5.14.4 until it says 5.18.2 instead.

Beware, because it's test, every time you run setup.exe again, you
have to be careful to re-select it, or it will get downgraded to 5.14
again.


I think the problem is that I'm using Cygwin 64bit but when I click on 
5.14.4 is doesn't change. Perhaps 5.18.2 is only compiled for 32 bit?

--
Andrew DeFaria
http://defaria.com


--
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: Setting up Apache2 with mod_perl and Apache2::AuthCookieLDAP

2014-05-07 Thread Andrew DeFaria

On 5/7/2014 5:12 PM, Warren Young wrote:

On 5/6/2014 11:42, Andrew DeFaria wrote:


Adefaria-lt:cygrunsrv -I httpd2 -d 'CYGWIN Apache2' -p


This may be your problem.

While poking around in /usr/sbin, I found httpd2-config, which is 167
lines long, so it must be doing something fairly clever.

I tried it, and Cygwin Apache is running as a service on my box now.


Actually it's not that clever but it does install the service. My 
problem was slightly different. See 
https://sourceware.org/ml/cygwin/2014-05/msg00142.html



I still think you're begging for trouble by building new software on top
of mod_perl in 2014, though. :)


I'm tempted to say: I'm a consultant and trouble rarely follows me ;-) 
however I am also a professional. Still I do what my client asks me to 
do. The client didn't even ask me to use mod_perl! In fact they don't 
use it but wanted to start (that's how far behind they are(?)).


I don't even understand why I need mod_perl at all... I just want to 
authenticate via LDAP to the Active Directory domain server. I set up 
the basic authentication using LDAP/Active Directory authentication but 
the boss is saying he'd like it make it more convenient for the 
engineers and use cookies so they don't have to log in every time they 
restart their browser. I looked up about authentication and cookies and 
that led me to Apache2::AuthCookieLDAP, which is pulling in the whole 
mod_perl thing...


... You're in a twisty maze of dependencies, all different...
--
Andrew DeFaria
http://defaria.com


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



Setting up Apache2 with mod_perl and Apache2::AuthCookieLDAP

2014-05-06 Thread Andrew DeFaria
I've been working mainly on Linux boxes and haven't had to dig in to 
Cygwin deeply for a while. But I have a question or two again. I could 
just switch to a Linux server but I figured I'd try my Windows laptop 
first.

Goal: Set up Apache2 on my Windows laptop with mod_perl working as well 
as Apache2::AuthCookieLDAP and write an example login page that 
authenticates to Active Directory using AuthCookieLDAP.

First problem (minor): I can't figure out how to install Apache2 as a 
Windows service. For now I can just do apachectl2 start but would like 
to configure it as a real service. I've tried:

Adefaria-lt:cygrunsrv -I httpd2 -d 'CYGWIN Apache2' -p 
/usr/sbin/httpd2.exe -a '-DNO_DETACH'
Adefaria-lt:net start httpd2
The CYGWIN Apache2 service is starting.
The CYGWIN Apache2 service could not be started.

The service did not report an error.

More help is available by typing NET HELPMSG 3534.

Adefaria-lt:

Second problem: Perl CGI scripts do not execute but just display even 
though AddHandler is configured in Apache:

Adefaria-lt:grep -i 'addhandler cgi-script' /etc/apache2/httpd.conf
 AddHandler cgi-script .cgi .pl
Adefaria-lt:cat ~/web/test.pl
#!/usr/bin/perl

print Content-type: text/html\n\n;
print HTML;
html
head
titleA Simple Perl CGI/title
/head
body
h1A Simple Perl CGI/h1
pHello World/p
/body
HTML
exit;
Adefaria-lt:

When I go to test.pl it just gets printed as the web page. Note that PHP 
is working and if I go to phpinfo.php it works just fine...

Third problem: mod_perl2 doesn't seem to want to install:

Running install for module 'mod_perl2'
Running make for P/PH/PHRED/mod_perl-2.0.8.tar.gz
Checksum for 
/home/adefaria/.cpan/sources/authors/id/P/PH/PHRED/mod_perl-2.0.8.tar.gz ok
Catching error: Couldn't move 
/cygdrive/a/.cpan/build/tmp-156520/mod_perl-2.0.8/src to 
/home/adefaria/.cpan/build/mod_perl-2.0.8-zKWTRp/src: Is a directory at 
/usr/lib/perl5/5.14/CPAN/Distribution.pm line 
528.\cJ\cICPAN::Distribution::run_preps_on_packagedir(CPAN::Distribution=HASH(0x60aa40ad8))
 
called at /usr/lib/perl5/5.14/CPAN/Distribution.pm line 
355\cJ\cICPAN::Distribution::get(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Distribution.pm line 
1760\cJ\cICPAN::Distribution::make(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Distribution.pm line 
3088\cJ\cICPAN::Distribution::test(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Distribution.pm line 
3480\cJ\cICPAN::Distribution::install(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Module.pm line 479\cJ\cIeval {...} 
called at /usr/lib/perl5/5.14/CPAN/Module.pm line 
478\cJ\cICPAN::Module::rematein(CPAN::Module=HASH(0x607f96780), 
\install\) called at /usr/lib/perl5/5.14/CPAN/Module.pm line 
578\cJ\cICPAN::Module::install(CPAN::Module=HASH(0x607f96780)) called at 
/usr/lib/perl5/5.14/CPAN/Shell.pm line 
1797\cJ\cICPAN::Shell::rematein(\CPAN::Shell\, \install\, 
\Apache2::AuthCookie\) called at /usr/lib/perl5/5.14/CPAN/Shell.pm 
line 1977\cJ\cICPAN::Shell::__ANON__(\CPAN::Shell\, 
\Apache2::AuthCookie\) called at /usr/lib/perl5/5.14/CPAN.pm line 
376\cJ\cIeval {...} called at /usr/lib/perl5/5.14/CPAN.pm line 
373\cJ\cICPAN::shell() called at /usr/lib/perl5/5.14/App/Cpan.pm line 
338\cJ\cIApp::Cpan::_process_options(\App::Cpan\) called at 
/usr/lib/perl5/5.14/App/Cpan.pm line 
421\cJ\cIApp::Cpan::run(\App::Cpan\) called at /bin/cpan line 12\cJ 
at /usr/lib/perl5/5.14/CPAN.pm line 392.
 CPAN::shell() called at /usr/lib/perl5/5.14/App/Cpan.pm line 338
 App::Cpan::_process_options(App::Cpan) called at 
/usr/lib/perl5/5.14/App/Cpan.pm line 421
 App::Cpan::run(App::Cpan) called at /bin/cpan line 12

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



Setting up Apache2 with mod_perl and Apache2::AuthCookieLDAP

2014-05-06 Thread Andrew DeFaria
I've been working mainly on Linux boxes and haven't had to dig in to 
Cygwin deeply for a while. But I have a question or two again. I could 
just switch to a Linux server but I figured I'd try my Windows laptop first.


Goal: Set up Apache2 on my Windows laptop with mod_perl working as well 
as Apache2::AuthCookieLDAP and write an example login page that 
authenticates to Active Directory using AuthCookieLDAP.


First problem (minor): I can't figure out how to install Apache2 as a 
Windows service. For now I can just do apachectl2 start but would like 
to configure it as a real service. I've tried:


Adefaria-lt:cygrunsrv -I httpd2 -d 'CYGWIN Apache2' -p 
/usr/sbin/httpd2.exe -a '-DNO_DETACH'

Adefaria-lt:net start httpd2
The CYGWIN Apache2 service is starting.
The CYGWIN Apache2 service could not be started.

The service did not report an error.

More help is available by typing NET HELPMSG 3534.

Adefaria-lt:

Second problem: Perl CGI scripts do not execute but just display even 
though AddHandler is configured in Apache:


Adefaria-lt:grep -i 'addhandler cgi-script' /etc/apache2/httpd.conf
AddHandler cgi-script .cgi .pl
Adefaria-lt:cat ~/web/test.pl
#!/usr/bin/perl

print Content-type: text/html\n\n;
print HTML;
html
head
titleA Simple Perl CGI/title
/head
body
h1A Simple Perl CGI/h1
pHello World/p
/body
HTML
exit;
Adefaria-lt:

When I go to test.pl it just gets printed as the web page. Note that PHP 
is working and if I go to phpinfo.php it works just fine...


Third problem: mod_perl2 doesn't seem to want to install:

Running install for module 'mod_perl2'
Running make for P/PH/PHRED/mod_perl-2.0.8.tar.gz
Checksum for 
/home/adefaria/.cpan/sources/authors/id/P/PH/PHRED/mod_perl-2.0.8.tar.gz ok
Catching error: Couldn't move 
/cygdrive/a/.cpan/build/tmp-156520/mod_perl-2.0.8/src to 
/home/adefaria/.cpan/build/mod_perl-2.0.8-zKWTRp/src: Is a directory at 
/usr/lib/perl5/5.14/CPAN/Distribution.pm line 
528.\cJ\cICPAN::Distribution::run_preps_on_packagedir(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Distribution.pm line 
355\cJ\cICPAN::Distribution::get(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Distribution.pm line 
1760\cJ\cICPAN::Distribution::make(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Distribution.pm line 
3088\cJ\cICPAN::Distribution::test(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Distribution.pm line 
3480\cJ\cICPAN::Distribution::install(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Module.pm line 479\cJ\cIeval {...} 
called at /usr/lib/perl5/5.14/CPAN/Module.pm line 
478\cJ\cICPAN::Module::rematein(CPAN::Module=HASH(0x607f96780), 
\install\) called at /usr/lib/perl5/5.14/CPAN/Module.pm line 
578\cJ\cICPAN::Module::install(CPAN::Module=HASH(0x607f96780)) called at 
/usr/lib/perl5/5.14/CPAN/Shell.pm line 
1797\cJ\cICPAN::Shell::rematein(\CPAN::Shell\, \install\, 
\Apache2::AuthCookie\) called at /usr/lib/perl5/5.14/CPAN/Shell.pm 
line 1977\cJ\cICPAN::Shell::__ANON__(\CPAN::Shell\, 
\Apache2::AuthCookie\) called at /usr/lib/perl5/5.14/CPAN.pm line 
376\cJ\cIeval {...} called at /usr/lib/perl5/5.14/CPAN.pm line 
373\cJ\cICPAN::shell() called at /usr/lib/perl5/5.14/App/Cpan.pm line 
338\cJ\cIApp::Cpan::_process_options(\App::Cpan\) called at 
/usr/lib/perl5/5.14/App/Cpan.pm line 
421\cJ\cIApp::Cpan::run(\App::Cpan\) called at /bin/cpan line 12\cJ 
at /usr/lib/perl5/5.14/CPAN.pm line 392.

CPAN::shell() called at /usr/lib/perl5/5.14/App/Cpan.pm line 338
App::Cpan::_process_options(App::Cpan) called at 
/usr/lib/perl5/5.14/App/Cpan.pm line 421

App::Cpan::run(App::Cpan) called at /bin/cpan line 12

--
Andrew DeFaria


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



Setting up Apache2 with mod_perl and Apache2::AuthCookieLDAP

2014-05-06 Thread Andrew DeFaria
Forgive me if this is double posted. I posted yesterday after a long 
hiatus of posting anything to the Cygwin Mailing list and it didn't seem 
to show up so I'm trying again. If anybody sees this then a quick email 
to adefa...@audience.com saying you saw it would clear that up.


I've been working mainly on Linux boxes and haven't had to dig in to 
Cygwin deeply for a while. But I have a question or two again. I could 
just switch to a Linux server but I figured I'd try my Windows laptop first.


Goal: Set up Apache2 on my Windows laptop with mod_perl working as well 
as Apache2::AuthCookieLDAP and write an example login page that 
authenticates to Active Directory using AuthCookieLDAP.


First problem (minor): I can't figure out how to install Apache2 as a 
Windows service. For now I can just do apachectl2 start but would like 
to configure it as a real service. I've tried:


Adefaria-lt:cygrunsrv -I httpd2 -d 'CYGWIN Apache2' -p 
/usr/sbin/httpd2.exe -a '-DNO_DETACH'

Adefaria-lt:net start httpd2
The CYGWIN Apache2 service is starting.
The CYGWIN Apache2 service could not be started.

The service did not report an error.

More help is available by typing NET HELPMSG 3534.

Adefaria-lt:

Second problem: Perl CGI scripts do not execute but just display even 
though AddHandler is configured in Apache:


Adefaria-lt:grep -i 'addhandler cgi-script' /etc/apache2/httpd.conf
AddHandler cgi-script .cgi .pl
Adefaria-lt:cat ~/web/test.pl
#!/usr/bin/perl

print Content-type: text/html\n\n;
print HTML;
html
head
titleA Simple Perl CGI/title
/head
body
h1A Simple Perl CGI/h1
pHello World/p
/body
HTML
exit;
Adefaria-lt:

When I go to test.pl it just gets printed as the web page. Note that PHP 
is working and if I go to phpinfo.php it works just fine...


Third problem: mod_perl2 doesn't seem to want to install:

Running install for module 'mod_perl2'
Running make for P/PH/PHRED/mod_perl-2.0.8.tar.gz
Checksum for 
/home/adefaria/.cpan/sources/authors/id/P/PH/PHRED/mod_perl-2.0.8.tar.gz ok
Catching error: Couldn't move 
/cygdrive/a/.cpan/build/tmp-156520/mod_perl-2.0.8/src to 
/home/adefaria/.cpan/build/mod_perl-2.0.8-zKWTRp/src: Is a directory at 
/usr/lib/perl5/5.14/CPAN/Distribution.pm line 
528.\cJ\cICPAN::Distribution::run_preps_on_packagedir(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Distribution.pm line 
355\cJ\cICPAN::Distribution::get(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Distribution.pm line 
1760\cJ\cICPAN::Distribution::make(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Distribution.pm line 
3088\cJ\cICPAN::Distribution::test(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Distribution.pm line 
3480\cJ\cICPAN::Distribution::install(CPAN::Distribution=HASH(0x60aa40ad8)) 
called at /usr/lib/perl5/5.14/CPAN/Module.pm line 479\cJ\cIeval {...} 
called at /usr/lib/perl5/5.14/CPAN/Module.pm line 
478\cJ\cICPAN::Module::rematein(CPAN::Module=HASH(0x607f96780), 
\install\) called at /usr/lib/perl5/5.14/CPAN/Module.pm line 
578\cJ\cICPAN::Module::install(CPAN::Module=HASH(0x607f96780)) called at 
/usr/lib/perl5/5.14/CPAN/Shell.pm line 
1797\cJ\cICPAN::Shell::rematein(\CPAN::Shell\, \install\, 
\Apache2::AuthCookie\) called at /usr/lib/perl5/5.14/CPAN/Shell.pm 
line 1977\cJ\cICPAN::Shell::__ANON__(\CPAN::Shell\, 
\Apache2::AuthCookie\) called at /usr/lib/perl5/5.14/CPAN.pm line 
376\cJ\cIeval {...} called at /usr/lib/perl5/5.14/CPAN.pm line 
373\cJ\cICPAN::shell() called at /usr/lib/perl5/5.14/App/Cpan.pm line 
338\cJ\cIApp::Cpan::_process_options(\App::Cpan\) called at 
/usr/lib/perl5/5.14/App/Cpan.pm line 
421\cJ\cIApp::Cpan::run(\App::Cpan\) called at /bin/cpan line 12\cJ 
at /usr/lib/perl5/5.14/CPAN.pm line 392.

CPAN::shell() called at /usr/lib/perl5/5.14/App/Cpan.pm line 338
App::Cpan::_process_options(App::Cpan) called at 
/usr/lib/perl5/5.14/App/Cpan.pm line 421

App::Cpan::run(App::Cpan) called at /bin/cpan line 12


--
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: Setting up Apache2 with mod_perl and Apache2::AuthCookieLDAP

2014-05-06 Thread Andrew DeFaria

On 5/6/2014 12:33 PM, Warren Young wrote:

On 5/6/2014 11:42, Andrew DeFaria wrote:

I could just switch to a Linux server but I figured I'd try my
Windows laptop first.


Don't neglect the option of running a minimal Linux VM on the laptop.
You can shove a headless Linux VMs into a pretty small slice of RAM.


Well I do happen to have a Linux VM but usually I'm just given a Windows 
laptop by my clients and must press on. Sure I could download and 
install vmware and get a Linux VM setup but that's a lot of work to do 
to set up a machine I'm basically only using for one thing. Sure setting 
up Cygwin takes work/care/feeding but I can then use that Cygwin 
installation all the time to connect to and develop stuff.



Goal: Set up Apache2 on my Windows laptop with mod_perl


mod_perl has been slowly dying for years.  It's not dead yet (*thwack*)
but it pretty much only works with Apache 2.2 and older.  RHEL7 won't
include it at all, because it will ship with Apache 2.4.6.  There are
third-party patches floating around the net that restore compatibility,
but this isn't the sort of thing you want to be building programs
against that have to live for many years to come.


...

Yeah thanks for all of that but really my real goal was just to get 
Apache2::AuthCookieLDAP working. That seems to require mod_perl. Of 
course if mod_perl is dying then that brings in the question of Is it 
worth it to develop a login page to authenticate with Active Directory 
and store cookies to ease logins if this all might be going away?.


... interesting info deleted but I will read up on it later - thanks! ...


If you do go with Dancer or something like it, you don't need to use
Cygwin Apache.  The native Windows version of Apache will perform much
better, and when used as a reverse proxy, you probably won't need any of
the benefits you get from using Cygwin Apache which native Apache
wouldn't have, such as the ability to compile and load some of the more
esoteric modules that only build on POSIXy systems.


First problem (minor): I can't figure out how to install Apache2 as a
Windows service.


Another reason to native Windows Apache instead.


Personally I prefer Cygwin Apache because all of the pathing then can be 
POSIX-like and can easily port to Linux systems later on. Plus Cygwin's 
Perl is, IMHO, far superior to ActiveState.


However I had set up Apache2 as a Windows service before so I know it's 
doable. I just forget how to do it! ;-) I thought it was just to specify 
-k or perhaps -DNO_DETACH or something like that...



--
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: Setting up Apache2 with mod_perl and Apache2::AuthCookieLDAP

2014-05-06 Thread Andrew DeFaria

On 5/6/2014 2:51 PM, Warren Young wrote:

On 5/6/2014 15:10, Andrew DeFaria wrote:


Yeah thanks for all of that but really my real goal was just to get
Apache2::AuthCookieLDAP working.


Plack::Middleware::Auth::Basic supports LDAP auth: http://goo.gl/O7RHgp


Personally I prefer Cygwin Apache because all of the pathing then can be
POSIX-like and can easily port to Linux systems later on. Plus Cygwin's
Perl is, IMHO, far superior to ActiveState.


The two issues are actually separate.  There's nothing making you use
ActiveState Perl to run a PSGI app front-ended by native Windows Apache.
  PSGI apps behind a reverse proxy simply present an HTTP interface to
the proxy.  As far as the proxy server knows, the app providing that
interface could be built in F#.


If you are using a Cygwin based Apache then it will follow symlinks 
whereas my experience with the Windows based Apache it doesn't.




(Why F#?  Another new favorite tool, and about as different from Perl as
you can get. :) )


However I had set up Apache2 as a Windows service before so I know it's
doable. I just forget how to do it! ;-) I thought it was just to specify
-k or perhaps -DNO_DETACH or something like that...


Did you try -F?

 http://comments.gmane.org/gmane.os.cygwin/60331


That message was about Apache 1.3. I'm on Apache 2.2. There is no -F option:

Adefaria-lt:/usr/sbin/httpd2 -F
httpd2: illegal option -- F
Usage: /usr/sbin/httpd2 [-D name] [-d directory] [-f file]
[-C directive] [-c directive]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S]
Options:
  -D name: define a name for use in IfDefine name directives
  -d directory   : specify an alternate initial ServerRoot
  -f file: specify an alternate ServerConfigFile
  -C directive : process directive before reading config files
  -c directive : process directive after reading config files
  -e level   : show startup errors of level (see LogLevel)
  -E file: log startup errors to file
  -v : show version number
  -V : show compile settings
  -h : list available command line options (this page)
  -l : list compiled in modules
  -L : list available configuration directives
  -t -D DUMP_VHOSTS  : show parsed settings (currently only vhost settings)
  -S : a synonym for -t -D DUMP_VHOSTS
  -t -D DUMP_MODULES : show all loaded modules
  -M : a synonym for -t -D DUMP_MODULES
  -t : run syntax check for config files
  -T : start without DocumentRoot(s) check
Adefaria-lt:


--
style type=text/css
body {
  font: Helvetica, Arial, sans-serif;
}
p {
  font: Helvetica, Arial, sans-serif;
}
.standout {
  font-family:  verdana,
arial,
sans-serif;
  font-size:12px;
  color:#99;
  line-height:  13px;
  font-weight:  bold;
  margin-bottom:10px;
}
.code {
  border-top:   1px solid #ddd;
  border-left:  1px solid #ddd;
  border-right: 2px solid #000;
  border-bottom:2px solid #000;
  padding:  10px;
  margin-top:   5px;
  margin-left:  5%;
  margin-right: 5%;
  background:   #ea;
  color:black;
  font-family:  courier;
  white-space:  pre;
  -moz-border-radius:   10px;
}
.terminal {
  border-top:   10px solid #03f;
  border-left:  1px solid #ddd;
  border-right: 2px solid grey;
  border-bottom:2px solid grey;
  padding:  10px;
  margin-top:   5px;
  margin-left:  5%;
  margin-right: 5%;
  background:   black;
  color:white;
  font-family:  courier;
  white-space:  pre;
  -moz-border-radius:   10px;
}
a:link {
  color:blue;
}

a:visited {
  color:darkblue;
}

a:hover {
  color:black;
  background-color: #cc;
  text-decoration:  underline;
}

a:active {
  color:red;
}
/style
img src=http://defaria.com/Images/clearscm.com-qrcode.jpg; 
align=left height=100 width=100/br

a href=http://defaria.com;Andrew DeFaria/abr
a href=http://clearscm.com;ClearSCM, Inc./abr


--
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 clone failing with fatal: index-pack failed

2013-11-05 Thread Andrew DeFaria

On 10/31/2013 08:04 AM, Andrew DeFaria wrote:

On 10/26/2013 03:12 PM, Balaji Venkataraman wrote:

On Sat, Oct 26, 2013 at 9:23 AM, Andrew DeFaria wrote:
It's been very quite about this issue. Usually at least somebody 
responds. I

fear that perhaps nobody's seeing this. Could somebody, anybody, simply
respond if even just to say Yeah, I see this. Don't have an answer 
though

I'd appreciate it.

I see something similar intermittently but only when I try to clone in
a non-Administrator shell and that too only on cygwin32. It doesn't
happen when I'm in an administrator shell. Haven't been able to figure
it out - although I'm having other problems where I can't run many
commands from a 32bit Cygwin shell - so I don't want to set you off on
a random thread. Are you able to do things like man, make etc. from
the same shell?
Interesting. Running an administrator shell works! The odd thing is 
that I logged in as the user Administrator, the local user 
Administrator. I assume it has administrator rights but I know that 
there are administrator rights and then there are administrator 
rights. So it seems the problem lies between the two. How to debug 
this further and fix it?

Another error that I'm getting is the following:

$ git fetch
Warning: No xauth data; using fake authentication data for X11 forwarding.
X11 forwarding request failed on channel 0
fatal: Out of memory? mmap failed: Resource temporarily unavailable
$

Note that this happens whether or not I start an administrator shell. 
Also note the memory is not particularly low at the time and that Git 
bash for Windows ( https://code.google.com/p/msysgit/) doesn't seem to 
have a problem with this.


The silence on these problems is interesting. Usually people have a lot 
of at least opinions to share if not things to try. Anybody got anything?

--
Andrew DeFaria http://defaria.com
When there's a will, I want to be in it.


--
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 clone failing with fatal: index-pack failed

2013-11-05 Thread Andrew DeFaria

On 11/05/2013 03:35 PM, Balaji Venkataraman wrote:

On Tue, Nov 5, 2013 at 7:28 AM, Andrew DeFaria and...@defaria.com wrote:


On 10/31/2013 08:04 AM, Andrew DeFaria wrote:

On 10/26/2013 03:12 PM, Balaji Venkataraman wrote:

On Sat, Oct 26, 2013 at 9:23 AM, Andrew DeFaria wrote:

It's been very quite about this issue. Usually at least somebody
responds. I
fear that perhaps nobody's seeing this. Could somebody, anybody, simply
respond if even just to say Yeah, I see this. Don't have an answer
though
I'd appreciate it.

I see something similar intermittently but only when I try to clone in
a non-Administrator shell and that too only on cygwin32. It doesn't
happen when I'm in an administrator shell. Haven't been able to figure
it out - although I'm having other problems where I can't run many
commands from a 32bit Cygwin shell - so I don't want to set you off on
a random thread. Are you able to do things like man, make etc. from
the same shell?

Did you try these (man, make etc.) from a non-admin shell?
I think you're talking to the other guy however when I did man, make, 
etc. they worked fine.

Interesting. Running an administrator shell works! The odd thing is that I
logged in as the user Administrator, the local user Administrator. I assume
it has administrator rights but I know that there are administrator rights
and then there are administrator rights. So it seems the problem lies
between the two. How to debug this further and fix it?

Another error that I'm getting is the following:

$ git fetch
Warning: No xauth data; using fake authentication data for X11 forwarding.
X11 forwarding request failed on channel 0
fatal: Out of memory? mmap failed: Resource temporarily unavailable
$

Note that this happens whether or not I start an administrator shell. Also

Could you do the following and report back:
- open windows explorer and navigate to C:\Cygwin\bin (or where ever
the root of your 32 bit Cygwin installation).
Stop. AFAICT I don't have a 32 bit Cygwin installation. I have a 64 bit 
Cygwin installation. Again, I think you're talking to the other guy. 
However I did report this new problem with git fetch and the nmap failed.

- scroll down to find sh.exe and check whether you see the windows
'Administrator' shield on it?

If it has a shield on it, that is the source of all problems.

I'll look for this however.
--
Andrew DeFaria http://defaria.com
Criminal Lawyer is a redundancy.


--
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 clone failing with fatal: index-pack failed

2013-10-31 Thread Andrew DeFaria

On 10/26/2013 03:12 PM, Balaji Venkataraman wrote:

On Sat, Oct 26, 2013 at 9:23 AM, Andrew DeFaria wrote:

It's been very quite about this issue. Usually at least somebody responds. I
fear that perhaps nobody's seeing this. Could somebody, anybody, simply
respond if even just to say Yeah, I see this. Don't have an answer though
I'd appreciate it.

I see something similar intermittently but only when I try to clone in
a non-Administrator shell and that too only on cygwin32. It doesn't
happen when I'm in an administrator shell. Haven't been able to figure
it out - although I'm having other problems where I can't run many
commands from a 32bit Cygwin shell - so I don't want to set you off on
a random thread. Are you able to do things like man, make etc. from
the same shell?
Interesting. Running an administrator shell works! The odd thing is that 
I logged in as the user Administrator, the local user Administrator. I 
assume it has administrator rights but I know that there are 
administrator rights and then there are administrator rights. So it 
seems the problem lies between the two. How to debug this further and 
fix it?

--
Andrew DeFaria http://defaria.com
Black holes really suck.


--
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 clone failing with fatal: index-pack failed

2013-10-26 Thread Andrew DeFaria

On 10/23/2013 07:56 PM, Andrew DeFaria wrote:

Please excuse any duplication.

I'm getting the following when attempting to clone a large git 
repository using Cygwin's git:


$ git clone gitolite@172.20.10.200:axcient
Cloning into 'axcient'...
remote: Counting objects: 168263, done.
remote: Compressing objects: 100% (73257/73257), done.
remote: Total 168263 (delta 90112), reused 166470 (delta 88591)
Receiving objects: 100% (168263/168263), 4.10 GiB | 14.30 MiB/s, done.
error: index-pack died of signal 11)
fatal: index-pack failed
$ git --version
git version 1.7.9
$ uname -a
CYGWIN_NT-6.1 MATER2K8SHPT 1.7.25(0.270/5/3) 2013-08-31 20:37 x86_64 
Cygwin

$

I saw some things about this a while ago. Has this been fixed?
It's been very quite about this issue. Usually at least somebody 
responds. I fear that perhaps nobody's seeing this. Could somebody, 
anybody, simply respond if even just to say Yeah, I see this. Don't 
have an answer though I'd appreciate it.


I'd really like to get this working though as it would be really helpful 
to switch my current client over to using Cygwin. As another data point, 
they have some sort of installation of Git that brings along a little 
bash shell and a couple of Linux like commands like ls, etc. It can 
clone the git repository and afterwards Cygwin's git can utilize that 
git repository doing things like git status, git log, etc. It just can't 
do the initial clone.


Thanks.
--
Andrew DeFaria http://defaria.com
(A)bort, (R)etry, (T)ake down entire network?


--
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 clone - error: index-pack died of signal 11

2013-10-23 Thread Andrew DeFaria
I know this has been asked before, a while ago. But I was wondering if 
this issue has been fixed yet. I'm doing a git clone of a large git 
repository using Cygwin and it fails:


Administrator@MATER2K8SHPT /cygdrive/d/cygwin
$ git clone gitolite@172.20.10.200:axcient
Cloning into 'axcient'...
remote: Counting objects: 169130, done.
remote: Compressing objects: 100% (74011/74011), done.
fatal: write error: Broken pipe169130), 282.85 MiB | 19.03 MiB/s
error: index-pack died of signal 11
fatal: index-pack failed

Administrator@MATER2K8SHPT /cygdrive/d/cygwin
$


--
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 clone failing with fatal: index-pack failed

2013-10-23 Thread Andrew DeFaria

Please excuse any duplication.

I'm getting the following when attempting to clone a large git 
repository using Cygwin's git:


$ git clone gitolite@172.20.10.200:axcient
Cloning into 'axcient'...
remote: Counting objects: 168263, done.
remote: Compressing objects: 100% (73257/73257), done.
remote: Total 168263 (delta 90112), reused 166470 (delta 88591)
Receiving objects: 100% (168263/168263), 4.10 GiB | 14.30 MiB/s, done.
error: index-pack died of signal 11)
fatal: index-pack failed
$ git --version
git version 1.7.9
$ uname -a
CYGWIN_NT-6.1 MATER2K8SHPT 1.7.25(0.270/5/3) 2013-08-31 20:37 x86_64 Cygwin
$

I saw some things about this a while ago. Has this been fixed?
--
Andrew DeFaria

--
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: Using cygpath with backticks

2013-06-22 Thread Andrew DeFaria

On 06/22/2013 08:39 AM, Matt D. wrote:

Maybe I've just had a long week but I can't seem to get this to work:

alias pathw='echo `cygpath -w $@`'
pathw /cygdrive/g/

I also tried:

alias pathw='echo $(cygpath -w $@)'

cygpath just yells at me that I'm doing something wrong.

Try a real function:

$ function pathw {
 echo $(cygpath -w $@)
 }
$ pathw /cygdrive/c
C:\
$

I don't think that $@ is evaluated in the context of an alias.

However, if all you are doing is echoing out the Windows path for a 
posix path then that's already what cygpath does. And the following also 
would work:


$ alias pathw='cygpath -w'
$ pathw /cygdrive/c
C:\
$
--
Andrew DeFaria http://defaria.com
Cranial-rectal inversion disorder - a condition where one's head is 
where one's butt should be and vice-versa, causing an otherwise sensible 
person to make an ass of himself.



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

2013-06-21 Thread Andrew DeFaria

On 06/21/2013 02:11 PM, Larry Hall (Cygwin) wrote:

On 6/21/2013 3:47 PM, Nellis, Kenneth wrote:

From: Larry Hall (Cygwin)


On 6/21/2013 2:38 PM, Nellis, Kenneth wrote:

I have a BAT file that calls a bash script that generates the
following (edited):

cygwin warning:
MS-DOS style path detected: XXX
Preferred POSIX equivalent is: XXX
CYGWIN environment variable option nodosfilewarning turns off 
this warning.

Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

If I rerun the script, I don't get the message a second time, which
makes debugging the problem a problem. How can I have this message
show up on every invocation? I tried closing all Cygwin processes
and tried setting CYGWIN=dosfilewarning, but it seemed to want
something more.


It's not designed to do that.  It will show up once per Cygwin DLL
session only.  If you want to see something different, you'll need
to patch the Cygwin source.


Thanx, but isn't the end of a Cygwin DLL session when all processes
that use the Cygwin DLL have terminated?


Yes, that's correct.  If you're not getting the message, you still have a
process somewhere keeping the DLL in memory.



Sounds like a job for Process Explorer...
--
Andrew DeFaria http://defaria.com
Question: Why do people always seem to find things in the last place 
that they look? Answer: Because most people stop looking after they find 
it!



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



X11 forwarding request failed on channel 0

2013-06-18 Thread Andrew DeFaria
Lately I noticed the following error when attempting to ssh from my 
Ubuntu (13.04) systems to my Cygwin system with X11 Forwarding turned on:


X11 forwarding request failed on channel 0

Any idea of how I can fix this?

Not sure if this is a Cygwin issue (but it does involve ssh) or a 
Cygwin/X issue.

--
Andrew DeFaria http://defaria.com
If you knees bent the other way, what would chairs look like?


--
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: X11 forwarding request failed on channel 0

2013-06-18 Thread Andrew DeFaria

On 06/18/2013 04:01 PM, Jon TURNEY wrote:

On 18/06/2013 17:23, Andrew DeFaria wrote:

Lately I noticed the following error when attempting to ssh from my Ubuntu

Not sure if lately means you haven't changed anything, but it didn't report
this error before, or you've only recently started paying attention :D
More like the later. I only run Windows in a VM anymore and I only 
really use it for Playon (See http://playon.tv) - that and I have some 
Perl code I want to make sure works on Windows through Cygwin. So most 
of the time I'm not running any X stuff on Cygwin.

(13.04) systems to my Cygwin system with X11 Forwarding turned on:

X11 forwarding request failed on channel 0

Any idea of how I can fix this?

Not sure if this is a Cygwin issue (but it does involve ssh) or a Cygwin/X 
issue.

Possibly you do not have the remote sshd configured to allow X11 forwarding.

See A5 to Q6.1 in the Cygwin/X FAQ [1].  The other answers may also be
informative.

[1] http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-ssh-no-x11forwarding
That seems to be it - ForwardX11 was commented out in /etc/sshd_config 
on the Cygwin box. Is this a new default?


In any event thanks.
--
Andrew DeFaria http://defaria.com
It has been said that democracy is the worst form of government except 
all the others that have been tried.



--
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: UNC and POSIX paths

2013-06-17 Thread Andrew DeFaria

On 06/17/2013 06:36 AM, Fedin Pavel wrote:

  Hello!

  I decided to pay attention to one more problem. Lots of not very well
written configure scripts and makefiles like to access things like
'//usr/bin'. Under Cygwin this causes problem because Cygwin treats '//' in
Windows-style as access to network shares.
  What if we change this ? We could have a mount entry, something like '/unc'
(or /smb, /net, whatever) and access it like '/smb/computername/sharename'.
I think this would improve POSIX compatibility a lot.
Why not simply fix the not very well written configure scripts and 
makefiles instead? BTW I've never come across a single one of those. 
Where are you getting yours?

--
Andrew DeFaria http://defaria.com
Very funny Scotty - now beam down my clothes.


--
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: UNC and POSIX paths

2013-06-17 Thread Andrew DeFaria

On 06/17/2013 08:12 AM, g...@malth.us wrote:

Why not simply fix the not very well written configure scripts and
makefilesinstead? BTW I've never come across a single one of those.
Where are you getting yours?

Can't answer this offhand (aware you didn't ask me :P) but, under the
misguidance of PM's like Gentoo(portage) and rpm(build), when combined with
poorly and/or belligerently written packaging scripts, this can happen
incessantly.  But that mostly only comes up when building Frankencygwins.
Sometimes you can fix it by forcing something like --prefix=///usr/local.
I'm trying to understand the reluctance towards fixing the problem and 
instead the insistence on putting a band aid on it. So in the above, 
why would you not instead do --prefix=/usr/local?

A CYGWIN env flag to disable UNC paths, or graft them somewhere other than
//, or an fstab-hack--basically anything allowing one to turn this feature
off--would be a moderate blessing for a small number (greater than or equal
to one) of people, but SHTDI, and this is endlessly proposed and
insta-shot-down.

At least one merit-based argument does recommend against implementing this
-- a great many configure scripts test for whether // == /, which means
packages could break if packagers happened to build while using the proposed
anti-feature-feature (the inevitable response being, shouldn't those
packages just fix their broken configure scripts? :P)

Yes, indeed. See above.
--
Andrew DeFaria http://defaria.com
If a mute swears does his mother wash his hands with soap?


--
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: UNC and POSIX paths

2013-06-17 Thread Andrew DeFaria

On 06/17/2013 10:35 AM, Achim Gratz wrote:

Andrew DeFaria writes:

I'm trying to understand the reluctance towards fixing the problem
and instead the insistence on putting a band aid on it. So in the
above, why would you not instead do --prefix=/usr/local?

Because some scripts try to use

$(DESTDIR)/$(PREFIX)

rather than

$(DESTDIR)$(PREFIX)

or otherwise insist on adding a slash somewhere in the expansion of
directory paths without checking whether they are  or /.  While it'd
be preferable that these expansions be fixed, simply prepending a few
more slashes usually works when the system follows POSIX rules since
only // is special.
I'm confused. Let me ask a different way - why not fix such scripts 
instead? That's all I'm asking.

--
Andrew DeFaria http://defaria.com
Copywight 1994 Elmer Fudd. All wights wesewved.


--
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: UNC and POSIX paths

2013-06-17 Thread Andrew DeFaria

On 06/17/2013 10:54 AM, g...@malth.us wrote:
As to why not fix the upstreams committing these atrocities, it's the 
obvious reason -- occasionally one encounters a large body of dense, 
non-fixable-by-sed/perl, poorly commented spaghetti script-code that 
makes clever, deep usage of the assumption that // == /. Being 
able to turn this feature off at one's option would enable them to 
rule out // as a problem when they suspect it might be, and have the 
additional benefit of not having to fix such code, in order to run it. 
-gmt 
If upstream code is broken it's broken. You can 1) fix it and submit it 
as a patch or 2) don't fix it and find a better solution.


Stripping off additional '/''s is not that hard a problem to solve - 
even in spaghetti code.

--
Andrew DeFaria http://defaria.com
I just got skylights put in my place. The people who live above me are 
furious!



--
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: UNC and POSIX paths

2013-06-17 Thread Andrew DeFaria

On 06/17/2013 12:01 PM, Dan Kegel wrote:

Andrew DeFaria wrote:

I'm confused. Let me ask a different way - why not fix such scripts instead?
That's all I'm asking.

He's probably daunted by the thought.

Doesn't really address the question.

OK, I'm out of here...
--
Andrew DeFaria http://defaria.com
Always try to be modest. And be damn proud of it!


--
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: UNC and POSIX paths

2013-06-17 Thread Andrew DeFaria

On 06/17/2013 07:18 PM, g...@malth.us wrote:
Mostly, I couldn't resist giving a literal answer to Andrew's 
(maybe-not-so-literally-intended) question of why not fix it? 
(nevertheless, I did fix it, already). 

I see, and I rest my case...
--
Andrew DeFaria http://defaria.com
A Clean House Is A Sign Of A Misspent Life


--
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: when will the cygwin site come up?

2013-03-19 Thread Andrew DeFaria

On 03/19/2013 08:21 AM, Larry Hall (Cygwin) wrote:

On 3/19/2013 11:02 AM, ping wrote:

it is still down now... and I just deleted the whole folder and need a
re-install...


If by this you mean you need to install Cygwin, if you have a recent
'setup.exe' for it, just run it and install.

And if you don't have a recent copy you can get one from 
http://defaria.com/tmp/setup.exe (- will be deleted in 7 days)

--
Andrew DeFaria http://defaria.com
I don't have a license to kill. I have a learner's permit.


--
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 do I change the default home directory after I fire up cygwin?

2013-01-22 Thread Andrew DeFaria

On 1/22/2013 8:31 AM, Andrey Repin wrote:

Greetings, Yves!


I start up cygwin and do pwd, and this is my home directory.
$ pwd
/cygdrive/h
But, I don't want it to be in /cygdrive/h.  So, what gives?  I've run the
mkpasswd command like so (while in my /home/my name directory):
mkpasswd -l -p $(cygpath -H)  /etc/passwd
At that point, I close my cygwin window and open it again... and same thing
when I run pwd.  How do I make cygwin think and start in /home/my name?
I've even mucked with the /etc/passwd for my user account and STILL no
result.
Very confused...

Check the contents of your $HOME variable.
Yes, check the contents of your $HOME environment variable as set in 
Windows (not Cygwin) by looking at My Computer: Properties: Advanced: 
Environment Variables. Check both User and System Environment variables 
sections (user will override system). It is common in corporate 
environments to use the H drive to point to some remote file system that 
gets mounted at boot time. That's your real home directory and often the 
same home directory you'll use on Unix/Linux machines should your 
company have any of them. Sharing a home directory is a good thing.


As for /etc/password and /home/userid, what I usually do is figure out 
what this H drive points to and then add something like the following to 
/etc/fstab and do a mount -a:


   //server/share   /home/userid ntfs   
   binary,posix=0,user 0 0


and make sure your line in /etc/passwd sets your home directory to 
/home/userid. In this manner everybody's happy and no matter which 
architecture you're on (Windows/Linux/Solaris/etc) home is always 
/home/userid...


There's no place like $HOME... :-)
--
Andrew DeFaria http://defaria.com
This space for rent


--
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 do I change the default home directory after I fire up cygwin?

2013-01-22 Thread Andrew DeFaria

On 1/22/2013 9:50 AM, Yves wrote:

This machine is on a corporate network, I'm doing this setup at work :) .
And yes, there's a domain.

And, after looking at System variables, I found HOME which is pointed to
H:\.  Would it make sense to just set that to C:\cygwin\home\user name?
Personally I'd delete the environment variable that sets HOME to a drive 
letter. Drive letters are so 1990's! And largely unneeded anymore.


See also my other post about how to mount what was mounted at H to 
/home/userid.


In general, IIRC Cygwin says that if HOME is already set in the Windows 
environment then we'll use that - otherwise we'll use what's in 
/etc/passwd (and I think last resort /home/userid).

--
Andrew DeFaria http://defaria.com
This space for rent


--
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 rsh in windows using cygwin

2013-01-17 Thread Andrew DeFaria

On 1/17/2013 4:31 AM, Earnie Boyd wrote:

On Thu, Jan 17, 2013 at 12:49 AM, Andrew DeFaria wrote:

On 01/16/2013 08:27 PM, Linda Walsh wrote:

Andrew DeFaria wrote:

On 01/16/2013 07:24 AM, Tim Prince wrote:

I still remember the occasion 15 years ago when I entered rsh tim and
found myself logged in as the head of corporate IT with root privilege.

Did you do rm -rf /?

I remember going to Frys and seeing a mac with a bash shell window logged
in as root. Guess what I did...

Never leave a root bash shell open to the public...

---
At least not when there are criminals around.
Deliberate destruction of property is a crime in all states.

Prosecute me then!

Besides I didn't say that I actually did do it...

You did type it in without the return just to give the owner the gut
wrenching idea of what could have been didn't you? ;p

Perhaps. Of course you assume they would recognize the implications. We 
are talking Frys ya know! ;-)

--
Andrew DeFaria http://defaria.com
This space for rent


--
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 rsh in windows using cygwin

2013-01-16 Thread Andrew DeFaria

On 01/16/2013 04:14 AM, Divakar wrote:

We used rsh (from third party tool) in our script. so we are planning to use the
same rsh functionality using cygwin.

it needs lot of work in the machine side as well as in the script site if we
implement something new like ssh.
In my experience, after setting up ssh to work, it's pretty much a drop 
in replacement for rsh. By that I mean I've found that, again once set 
up, if I simply change rsh - ssh everything else works without a change.


And I believe that many more people know and use ssh than rsh meaning 
you'd probably get more support by using ssh.


Maybe you could describe exactly what you are doing with rsh...
--
Andrew DeFaria http://defaria.com
If it's true that we are here to help others, then what exactly are the 
others here for?



--
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 rsh in windows using cygwin

2013-01-16 Thread Andrew DeFaria

On 01/16/2013 07:24 AM, Tim Prince wrote:
I still remember the occasion 15 years ago when I entered rsh tim 
and found myself logged in as the head of corporate IT with root 
privilege.

Did you do rm -rf /?

I remember going to Frys and seeing a mac with a bash shell window 
logged in as root. Guess what I did...


Never leave a root bash shell open to the public...
--
Andrew DeFaria http://defaria.com
As I always say I never repeat myself


--
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 rsh in windows using cygwin

2013-01-16 Thread Andrew DeFaria

On 01/16/2013 08:27 PM, Linda Walsh wrote:

Andrew DeFaria wrote:

On 01/16/2013 07:24 AM, Tim Prince wrote:
I still remember the occasion 15 years ago when I entered rsh tim 
and found myself logged in as the head of corporate IT with root 
privilege.

Did you do rm -rf /?

I remember going to Frys and seeing a mac with a bash shell window 
logged in as root. Guess what I did...


Never leave a root bash shell open to the public...

---
At least not when there are criminals around.
Deliberate destruction of property is a crime in all states.

Prosecute me then!

Besides I didn't say that I actually did do it...
--
Andrew DeFaria http://defaria.com
Good judgment comes from bad experience... Which comes from bad judgment


--
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 rsh in windows using cygwin

2013-01-15 Thread Andrew DeFaria

On 1/15/2013 11:54 AM, Larry Hall (Cygwin) wrote:

On 1/15/2013 7:42 AM, Divakar K wrote:

Hi Folks,

i dont know how to rsh from windows to windows?

installed below packages which related to rsh.

1, rsh
2. rsh-server
3. tcp_wrapper
4. xinetd

changed the disable value to no in the rsh conf file
/etc/xinetd.d/rsh.conf.

i think rshd services has to start. but i dont know how to start this
and any other configuration need to be done?

can someone please help me to do this?


See the Cygwin documentation for this package in
/usr/share/doc/Cygwin/xinetd.README.



I'm curious - is there a reason you don't want to use the more secure ssh?
--
Andrew DeFaria http://defaria.com
This space for rent


--
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: adding a folder to my path

2013-01-02 Thread Andrew DeFaria

On 1/2/2013 9:18 AM, LMH wrote:
I think this is a cygwin question, though it is certainly a general 
linux question as well. I would like to divide up and organize some of 
the apps and links in my path directories (such as /usr/local/bin) 
into sub directories. If I add a folder to /usr/local/bin, that folder 
is not in my path. Can someone give me the instructions for adding a 
folder such as /usr/local/bin/ruby_viewer/ to my path?

This is a basic question that is shell specific and all.

What I do is I have a function, called append_to_path:

   append_to_path ()
   {
component=$1;
if [ -d $component ]; then
if [ -z $PATH ]; then
PATH=$component;
else
PATH=$PATH:$component;
fi;
fi
   }

It appends to the PATH IFF the component passed in is a directory that 
exists. This allows me to loop through a set of directories knowing that 
only those that exist will end up on the path:


   systemroot=$(cygpath -u $SYSTEMROOT)
   path_dirs=\
  .\
  $HOME/bin\
  /opt/Rational/Clearcase/bin\
  ...
  /usr/local/bin\
  ...
  $systemroot/System32\
  $systemroot

   PATH=
   for component in $path_dirs; do
  append_to_path $component
   done

This allows me to set my PATH from scratch exactly how I want it. I add 
Unix paths, Solaris paths, HP_UX paths, FreeBSD paths and Windows paths 
to path_dirs. The net result is that I get the right set of paths on 
each of these systems dynamically.


YMMV.
--
Andrew DeFaria http://defaria.com
This space for rent


--
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 make persistent changes to PATH in cygwin?

2013-01-02 Thread Andrew DeFaria

On 1/2/2013 10:45 AM, Aaron Schneider wrote:

On 02/01/2013 19:35, Eliot Moss wrote:

Every time you open up mintty you are starting a new login bash.
The way to set environment variables persistently (your term,
not mine) is to add the export command to your .bash_profile or
similar bash file read by bash when it starts up.  This is not
specific to cygwin, but is normal Unix-like behavior.


I've workarounded it adding the desired path to windows' path 
directly, which is imported into cygwin each time mintty is started.


That's not really a good solution. Take a moment to read the bash(1) man 
page and familiarize yourself with it's startup capabilities. Take 
control of your own environment.

--
Andrew DeFaria http://defaria.com
This space for rent


--
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: trouble accessing samba shares with spaces and/or parentheses

2012-12-21 Thread Andrew DeFaria

On 12/21/2012 10:11 AM, bartels wrote:

So where can I find strace?

Where did you look?

$ type strace
strace is /bin/strace

BTW: Why the insistence on mapping it to a drive letter? Everybody 
always does that and I don't understand why. Drive letters change. Some 
people hard code 'em in their scripts. This is a recipe for errors. 
Other people say sometimes that some Windows apps can't work with UNC 
paths. I don't know of any that have this problem anymore. Q:/ doesn't 
tell me where this directly is located...

--
Andrew DeFaria http://defaria.com
This space for rent


--
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: trouble accessing samba shares with spaces and/or parentheses

2012-12-21 Thread Andrew DeFaria

On 12/21/2012 10:51 AM, bartels wrote:

On 12/21/2012 07:30 PM, Andrew DeFaria wrote:

On 12/21/2012 10:11 AM, bartels wrote:

So where can I find strace?

Where did you look?

$ type strace
strace is /bin/strace


strace is one of my favourite toys on linux.
Somehow, I never located it on cygwin. Never just typed in the magic 
word :)
The packaging is a little different here, and the searching not so 
easy. I expected a package.
I guess my point was you coulda just typed in strace and would have been 
pleasantly surprised!
BTW: Why the insistence on mapping it to a drive letter? Everybody 
always does that and I don't understand why. Drive letters change. 
Some people hard code 'em in their scripts. This is a recipe for 
errors. Other people say sometimes that some Windows apps can't work 
with UNC paths. I don't know of any that have this problem anymore. 
Q:/ doesn't tell me where this directly is located...


No reason, really, other than the fact that Windoze forces us to 
access physical storage devices via the silly drive letters .
But if I understood you correctly this is not a physical device but 
rather a network mount.
Not using drive letters would mean I have two different presentations: 
one for local storage and one for remote storage.

So what. You have two different devices.

Yet but using drive letters means you've just made a dependency that may 
not hold true on the next system and that people sometimes hard code 
into scripts. Then you get to a machine who's owner says Oh but I use 
my Q drive and all your scripting is screwed. A UNC path is always 
right - drive letters sometimes cause problems.

When in Rome . . .

When in Rome I'm still and American! ;-)

Said differently, yes when I was in Rome physically myself I tried to do 
things like Romans, however if they did something I thought foolish I 
didn't continue to do it that way just because I was in Rome. YMMV.
And is there a way to mount a network share without a drive letter, 
using cygwin?
Well, as I said, you could just refer to it - no mounting required! 
(Though I believe it really does mount it in some way for the duration 
of the remote file system access...)


Or you can just do

$ # \'s doubled because bash swallows them and net use requires them.
$ net use server\\share
$ net use
New connections will be remembered.

Status   Local RemoteNetwork

---
   \\server\share   Microsoft Windows Network
More importantly, is it possible to mount a network share, using 
cygwin, so that it becomes visible/available in explorer?
Again, no mounting is required. Open up Windows Explorer and type in the 
UNC (\\server\share) and there you are!


And if your question then becomes Yeah but can applications also access 
them? my experience has been Well yes, of course! (though there may 
be some Windows apps that can't I haven't hit many of them lately).
The scope of mounting seems to be limited to a process (tree). Every 
service must mount separately.

That's not been my experience.

Or have I missed something?

Might have. What have you tried?
--
Andrew DeFaria http://defaria.com
This space for rent


--
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: Passwordless authentication between two domains.

2012-11-30 Thread Andrew DeFaria

On 11/30/2012 9:35 AM, David T-G wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andrew --

...and then Andrew DeFaria said...
%
%On 11/30/2012 06:00 AM, David T-G wrote:
%
% But what if the evil is not real in the first place?
%
%I love it when people respond to my taglines.
[snip]

Thanks :-)

BTW, MAPS bounced my reply back to me; if you whitelist me, let me know
and I'll send more off-list mail.
If there's one thing I love more than when people response to my 
taglines then it must be when people fail to actually *read* the bounce 
back message which clearly tells the reader how to register 
themselves... ;-)


Now let's see if he can figure it out...

Sorry for the drift..
--
Andrew DeFaria http://defaria.com
Why do we drive on parkways and park on driveways?


--
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: Passwordless authentication between two domains.

2012-11-29 Thread Andrew DeFaria

On 11/29/2012 3:28 AM, David T-G wrote:

Andrew, et al --

...and then Andrew DeFaria said...
%
% On 11/28/2012 1:21 PM, anulav2 wrote:
% Andrew,
% Keys will ALWAYS be different irrespective if it is two servers on same
% or different domain.
% That is the whole point of copying keys to remote servers authorized_keys
% file.
% I don't think so. I do know the following - here at my current client
% there are two distinct domains that I deal with - Irvine and San Jose.
% My Windows laptop is in the Irvine domain. My home directory is on a
% filer and is shared between my Windows laptop and the various Linux
% server machines in Irvine. I generate a key and put it in my
% ~/.ssh/authorized_keys and I can ssh to localhost or any of the Linux
% servers. Additionally I can ssh from Linux to my laptop, passwordlessly.

That makes sense; all of the machines in Irvine (including your laptop)
are using the same id_dsa  id_dsa.pub  authorized_keys (or perhaps
authorized_keys2 but we'll ignore that for the moment) files.


%
...
% However if I generate a key in San Jose and put it in
% ~/.ssh/authorize_keys in Irvine then I can ssh from San Jose - Irvine
% without a password. This tells me that generated ssh keys are unique per
% domain. For bilateral ssh passwordless logins between the two domains
% you should have at least 2 lines in your ~/.ssh/authorized_keys file,
% one for each domain:
[snip]

Incorrect.  ssh doesn't care a bit what domain (if at all) or even what
OS you're using or where the key was generated.  This simply tells you
that the shared home directory in San Jose is not the same as the one in
Irvine.  If it were the same, then the very same id_dsa  id_dsa.pub 
authorized_keys files would work the very same way; since it is different
storage, however, you don't have the id_dsa key to match which would
allow San Jose - Irvine access.

Try this in both Irvine  San Jose:

   cd ~/.ssh
   ls -ligo id_dsa* authorized_keys*

I predict that you will find the inodes to be the same all over Irvine
and the same all over San Jose *but* different between the two locations.
You may find df or mount to be illustrative as well.
Oh I know I don't have the same home directory on both domains, in fact 
I stated that.


I think the part that was confusing me was that I didn't copy both the 
~/.ssh/id_dsa.pub and the ~/.ssh/id_dsa as a pair.


Thanks for the clarification and simplification.

So the op's problem is still a mystery...
--
Andrew DeFaria http://defaria.com
Is God willing to prevent evil, but not able? Then he is not omnipotent. 
Is he able, but not willing? then he is malevolent. Is he both able and 
willing? Then whence cometh evil? Is he neither able nor willing? Then 
why call him God?



--
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: Passwordless authentication between two domains.

2012-11-28 Thread Andrew DeFaria

On 11/28/2012 12:21 PM, anulav2 wrote:

ssh-keygen -t dsa
and password was empty.

I believe you mean passphrase...

What about these issues I mentioned:

Additionally is ~/.ssh/id_rsa.pub the same on both machines? (Does diff 
return no differences?). I believe, since these are two different 
domains, that the generated keys will not be the same. If they are the 
same then regenerate them on both machines and compare them again.


Also, ~/.ssh/id_rsa.pub from Domain A should be added to the 
~/.ssh/authorized_keys on Domain B and visa versa from Domain B - 
Domain A.


Finally, can you do passwordless authentication between two different 
machines in Domain A?

--
Andrew DeFaria http://defaria.com
If you can survive death, you can probably survive anything.


--
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: Passwordless authentication between two domains.

2012-11-28 Thread Andrew DeFaria

On 11/28/2012 12:54 PM, anulav2 wrote:

Yes, i meant passphrase.
Diff does not return anything, meaning keys are fine.

No meaning the keys are *not* fine. As I said twice now:

I believe, since these are two different domains, that the generated 
keys will *NOT* be the same. If they are the same then regenerate them 
on both machines and compare them again.


You need to read carefully. Note the *NOT* portion above. I believe that 
since the domains are different the ssh keys will be different. So diff 
should not return nothing but rather it should return that there are 
indeed differences between Domain A:~/.ssh/id_dsa.pub and Domain 
B:~/.ssh/id_dsa.pub. If not then log into Domain A and do the ssh-keygen 
-t dsa and then log into Domain B and do the ssh-keygent -t dsa there. 
They both should produce a ~/.ssh/id_dsa.pub file and those two files 
should be different. This would also mean that you cannot share home 
directories between two different domains...

And i have tried regenerating them again.
I have added rsa.pub files to authorized_keys on remote servers. No luck.




  From: Andrew DeFaria-2 [via Cygwin] ml-node+s1069669n9459...@n5.nabble.com
To: anulav2 anul...@yahoo.com
Sent: Wednesday, November 28, 2012 2:36 PM
Subject: Re: Passwordless authentication between two domains.
  


On 11/28/2012 12:21 PM, anulav2 wrote:

ssh-keygen -t dsa
and password was empty.

I believe you mean passphrase...

What about these issues I mentioned:

Additionally is ~/.ssh/id_rsa.pub the same on both machines? (Does diff
return no differences?). I believe, since these are two different
domains, that the generated keys will not be the same. If they are the
same then regenerate them on both machines and compare them again.

Also, ~/.ssh/id_rsa.pub from Domain A should be added to the
~/.ssh/authorized_keys on Domain B and visa versa from Domain B -
Domain A.

Finally, can you do passwordless authentication between two different
machines in Domain A?


--
Andrew DeFaria http://defaria.com
What do people in China call their good plates?


--
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: Passwordless authentication between two domains.

2012-11-28 Thread Andrew DeFaria

On 11/28/2012 1:21 PM, anulav2 wrote:

Andrew,
Keys will ALWAYS be different irrespective if it is two servers on same or 
different domain.
That is the whole point of copying keys to remote servers authorized_keys file.
I don't think so. I do know the following - here at my current client 
there are two distinct domains that I deal with - Irvine and San Jose. 
My Windows laptop is in the Irvine domain. My home directory is on a 
filer and is shared between my Windows laptop and the various Linux 
server machines in Irvine. I generate a key and put it in my 
~/.ssh/authorized_keys and I can ssh to localhost or any of the Linux 
servers. Additionally I can ssh from Linux to my laptop, passwordlessly.


If I take that key and put it into the ~/.ssh/authorized_keys in San 
Jose then this allows me to ssh into from Irvine to San Jose without a 
password. But I cannot ssh from San Jose - Irvine without being 
prompted for a password.


However if I generate a key in San Jose and put it in 
~/.ssh/authorize_keys in Irvine then I can ssh from San Jose - Irvine 
without a password. This tells me that generated ssh keys are unique per 
domain. For bilateral ssh passwordless logins between the two domains 
you should have at least 2 lines in your ~/.ssh/authorized_keys file, 
one for each domain:


ssh-dss 
B3NzaC1kc3MAAACBANIhaC5kcPP9paO1PgxbXmeoCTT/COtutXPQKcE85/ut6cvVCL4Ctwv0Uz04q+XdB75qvL+0pbfsg6kRkE6xSJpiOzNXe/ED+EXv1xnp5otlAi3FQD6ej4gmxyMdsn+Yf7E6TR7RsDfbQAAAIEAsQ5y+xF0fhjORxzivaFVZW2znN0eF5rRNONG7aN/2j9Fu3sTV8YRgjvOSL755Kg0r6a+fu3OMjWMaUFG4BGPTLH8jW3YlWJvTiYhq/3BR8nBh9by0NEiy3UTPyPYTZ8SZPaTABhDcfkQD1qum6TlIBDBlX5gI3Q/abtGGZoo3+CBAIQyf+LdDWl2Pq32NJC6ijufpynK1aOiPlUnvDoFh9snrQ+4JpgWDUsj7dRjbNZbu19PnamGnYduo2xz1USAu6+ePAXiW16m9512SpjKGIRSlnrjXcN+Ys8wJGtdGK0uk0c5q4wyd2Yh/BLsyneV8mWCIKGsi7PZ7gHd1vAqYjNa 
adefaria@Irvine
ssh-dss 
B3NzaC1kc3MAAACBGc2XQc9lkE4sacaUKWJBG+hIZFFGejIn4Q366boqkM+pSbx4k5j9UhLhke+nQO7L0lPDJ+TeBbzuSweOTzCN1DSOQEb9wQEeOIPR3WzhZSt7oEsoPDdWC2hUns4MoKKOtTO1Bje0E1c5LYd3hou7FQDCbH96A9u3EeJLe5OtlkItob2MhwAAAIEAoz4dtm9nqOH+YgNqxRmuyy3f46zSr/ALY747aOpRpxRnGcbZPO6bJHevkN7oomQwSzbHqJbsOzSMpjs9yrxQUAklGsdL7STC4HpheHUKyqGvZB1SP5pQ+thqPo4GQTIpEZxsmsrb5dRNOZstdWqeYQtsu0qYqvHOnxOSWsC5V3wAAACBALY5CD58gt12E4logCHko7p+k8KUS8eAapwbThhH6rsOWjnhBLEDqL4qWn3w8Lk+1vkGIkhZ5Iysbx81Tk6njhnklAFHHtp4MBxuuJbbqLGrM9SKMG1kQDfjFGowkZsLpf2jw37vy0fo/LfJ1NEGpVq6fI3U+O48PUcr2dEpO6UD 
adefaria@San Jose


Note that the 3rd field is treated as a comment so I changed it to 
adefaria@Irvine and adefaria@San Jose. Note 2: The above keys have been 
modified to protect them.


Why don't you try what I suggest and then report back if it worked.

  Else one could just cat its own key in its own authorized_keys file, right?
But one can just cat their own key to their own authorized_keys file. 
That's why permissions on ~/.ssh are of paramount importance to ssh - it 
needs to make sure that Tom didn't go into Jane's 
~/.ssh/authorized_keys file and insert themselves.


It is true that if you run ssh-keygen on different machines in the same 
domain you'll get different keys, but within the context of that domain 
any one of those keys will work. That's why sharing your home directory 
is a good thing and that's why I always work to get my home directory 
shared between Windows and Linux systems.

--
Andrew DeFaria http://defaria.com
I'm a tagline virus, please copy me to your signature file


--
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: Passwordless authentication between two domains.

2012-11-20 Thread Andrew DeFaria

On 11/20/2012 9:46 AM, anulav2 wrote:

Hello,

I am unable to use passwordless authentication between two 2008 windows
servers in two different domains.
Account name is same in both domains.
I can authenticate using password but not otherwise.
I have setup RSA keys and authorized_keys file. Permissons on .ssh are 700
and .ssh/authorized_keys are 600.
I have tried uninstall and re-install twice.
and following is part of what i get when i increase verbosity.
Is your home directory, oddly named /home/pal.rsync, set to 755? How 
about ~/.ssh? Also 755. No. 700. That may be the problem. My 
~/.ssh/authorized_keys is set to 644. My ~/.ssh/id_rsa is 600 but 
~/.ssh/id_rsa.pub is 644.


But I don't use any RSA anymore, I use DSA instead. I believe it is more 
secure.


Additionally is ~/.ssh/id_rsa.pub the same on both machines? (Does diff 
return no differences?). I believe, since these are two different 
domains, that the generated keys will not be the same. If they are the 
same then regenerate them on both machines and compare them again.


Also, ~/.ssh/id_rsa.pub from Domain A should be added to the 
~/.ssh/authorized_keys on Domain B and visa versa from Domain B - Domain A.


Finally make sure that the key is contained in one long line. Often, 
depending on the user's editor and it's setting, when you paste into the 
editor the editor may insert new lines.


These are the usual problems I see when people are attempting to set up 
passwordless authentication with ssh.

--
Andrew DeFaria http://defaria.com
I went to a general store, but they wouldn't let me buy anything specific.


--
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: Command line arguments

2012-11-02 Thread Andrew DeFaria

On 11/02/2012 05:36 AM, Earnie Boyd wrote:

YMMV when it comes time for maintenance by someone other than the code creator. 
 Consistency helps reduce cost and reducing company cost helps increase my pay 
check.
I disagree. A [emphasis on] *foolish* consistency doesn't do anything to 
reduce cost. It's something programmers believe helps, then they spend a 
lot of time making things consistent for consistency's sake based upon 
this myth and thus adds cost not reduces it. Sprinkling syntactic sugar 
obscures the clarity of things, again, IMHO.


Don't get me wrong - some forms of consistency are good and do help 
reduce cost because readability increases. But syntactic sugar is there 
for the computer - not the human.


As for paycheck, I can assure you that mine is at an all time high and 
way above the average (like 3x).

Taking a few seconds to use {} to delimit all variables is priceless in the 
world of maintenance.
No, IMHO it's wasteful to spend time doing this non-productive activity 
when it's the rare case that it is truly needed.

As a native English (American) speaker, I find myself more than once expanding 
contractions to make myself more clear about what I want to convey.
And it probably ain't any clearer to anybody. If consistency in language 
was that much of a concern and you really wanted to make it such that 
you are absolutely clear then you should drop English ( 
http://defaria.com/Jokes/Plan4ImprovementOfEnglishSpelling.php and 
http://defaria.com/Jokes/CrazyLanguage.php) and pick up Lojban ( 
http://en.wikipedia.org/wiki/Lojban). Of course then you'd be talking to 
yourself pretty much.

Contractions for contraction sake is not always a good thing.
Nobody said it was. This was an *example* - intended to convey a higher 
and deeper meaning. Think about it instead of simply taking it literally.


And with that I think we should end this, pretty much off topic 
discussion (take it to email if you'd like).

--
Andrew DeFaria http://defaria.com
One time a cop pulled me over for running a stop sign. He said Didn't 
you see the stop sign. I said Yeah, but I don't believe everything I 
read.



--
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: Command line arguments

2012-11-01 Thread Andrew DeFaria

On 11/1/2012 10:54 AM, Brian Wilson wrote:
I got in the habbit of always using the {} (even if they aren't 
absolutely necessary) to avoid such issues on general principal.
I don't think it's conducive to productivity to constantly type things 
that aren't needed for the simple sake of consistency - especially 
special characters which are by nature harder to type. As they say a 
foolish consistency is the hobglobin of little minds. I add syntactic 
sugar only when required, much like a native English speaker doesn't 
shy away from things like contractions under a habit of always spelling 
out all words even if they aren't absolutely necessary... YMMV.

--
Andrew DeFaria http://defaria.com
I know you believe you understand what you think I said, but I'm not 
sure you realize that what you heard is not what I meant.



--
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: Command line arguments

2012-10-31 Thread Andrew DeFaria

On 10/31/2012 11:23 AM, Brian Wilson wrote:

If you have a script (e.g. foo.sh) and you wish to pass arguments to the
script, your command line should look like foo.sh arg1 arg2 arg3...  The
number of arguments will be correct and you will be able to access them as
${1}, ${2}, etc.  Also, you may want to read up on the getopts command as a
way to process command line arguments.
Technically, the {}'s are not needed. You can access them with $1, $2, 
etc. Most special characters sever as delimiters too so you can refer to 
them as This the $1 parameter or even /path/to/$1/dir. But if you 
wanted to do something like this - This is the ${1}parameter or even 
/path/to/$1.save/dir but not /path/to/$1save/dir you'd need the {} 
(i.e. /path/to/${1}save/dir because otherwise the shell would be 
looking for 1save as an env variable name.

--
Andrew DeFaria http://defaria.com
Fear has its use but cowardice has none. - Mohandas Gandhi


--
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: Command line arguments

2012-10-31 Thread Andrew DeFaria

On 10/31/2012 12:40 PM, David T-G wrote:

Andrew, et al --

...and then Andrew DeFaria said...
%
% On 10/31/2012 11:23 AM, Brian Wilson wrote:
...
% ${1}, ${2}, etc.  Also, you may want to read up on the getopts command as a
% way to process command line arguments.
% Technically, the {}'s are not needed. You can access them with $1, $2,
...
% /path/to/$1.save/dir but not /path/to/$1save/dir you'd need the {}
% (i.e. /path/to/${1}save/dir because otherwise the shell would be
% looking for 1save as an env variable name.

... except that environment variables cannot begin with numbers :-)
I was thinking that and should have tested it... Sorry if there was any 
confusion there.


   davidtg@madi:~  cat /tmp/numvars.sh
   bash --version
   save=x
   echo $save
   1save=y
   echo $1save
   echo ${1save}
   davidtg@madi:~  bash -x /tmp/numvars.sh
   + bash --version
   GNU bash, version 2.05a.0(1)-release (i386-portbld-freebsd4.6)
   Copyright 2001 Free Software Foundation, Inc.

Interesting bash version there:

   $ bash --version
   GNU bash, version 4.1.10(4)-release (i686-pc-cygwin)
   Copyright (C) 2009 Free Software Foundation, Inc.
   License GPLv3+: GNU GPL version 3 or later
   http://gnu.org/licenses/gpl.html

   This is free software; you are free to change and redistribute it.
   There is NO WARRANTY, to the extent permitted by law.

You seem to be a bit behind...

   + save=x
   + echo x
   x
   + 1save=y
   /tmp/numvars.sh: 1save=y: command not found
   + echo save
   save
   /tmp/numvars.sh: ${1save}: bad substitution


% --
% Andrew DeFaria http://defaria.com
% Fear has its use but cowardice has none. - Mohandas Gandhi


HTH  Happy Hallowe'en

:-D



--
Andrew DeFaria http://defaria.com
When everything's coming your way, you're in the wrong lane.


--
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: real beginer

2012-10-24 Thread Andrew DeFaria

On 10/24/2012 05:17 AM, Trixie wrote:

I tried everything you wrote... and i still make; echo Status from make was
$?  i have status 2.
I renamed file and inserted your makefile to src...but still same result.
Generally make will stop at the first error. As such, the output of make 
just before it exits with a status of 2 would be extremely interesting

--
Andrew DeFaria http://defaria.com
Since light travels faster than sound, isn't that why some people appear 
bright until you hear them speak?



--
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: real beginer

2012-10-23 Thread Andrew DeFaria

On 10/23/2012 06:28 AM, Trixie wrote:

I'm real beginner with cygwin, actually linux and everything related.
But i need to instal and use certain fortran based program. I installed
cygwin and several packages. I'm trying to call certain module and all i get
is
bash: module: command not found
What is module? What's it supposed to be? Where did you get it? Where 
did you install it to?


Execution of scripts/binaries in Cygwin is not very much unlike 
execution of such commands in Windows cmd. The command name is searched 
for using the PATH environment variable. The difference really is 
Windows paths vs POSIX paths. That said, what do you see when you do 
echo $PATH in your bash shell?

I googled it up and i found the solution that i should call
/etc/profile.d/modules.sh before my module. but there is now module.sh in my
/profile.d folder! Did i miss some package to install? What should i do?
Please help! I desperately need to start that program :(((
Later on you mention that that program is BigDFT 
http://inac.cea.fr/L_Sim/BigDFT/. This appears to be a package 
distributed in source form. So now you have get it and build it. The 
build instructions mention nothing about Cygwin at all. So, effectively, 
you're talking about porting this program to Windows in the Cygwin 
environment. This is a very ambitious project for somebody who 
admittedly is a real beginner with Cygwin and Linux and everything 
related. Not impossible but a very, very big thing.  The install 
instructions talk about Fortran (so you'll need to install Fortran on 
Cygwin if you plan to go further) and using Intel's Fortran compiler as 
well as a C compiler. This is not a task for beginners unless they are 
tenacious in their goal of getting this done.


I would highly recommend you contact the developers of BigDFT and ask if 
they have considered porting it to Cygwin.

--
Andrew DeFaria http://defaria.com
And whose cruel idea was it to put an S in the word Lisp?


--
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: real beginer

2012-10-23 Thread Andrew DeFaria

On 10/23/2012 9:35 AM, Eliot Moss wrote:

On 10/23/2012 10:31 AM, Trixie wrote:

Thank you all.
Here's my story. I'm physics student and my master degree work is
Application of GPU on DFT calculations. I need this BigDFT to run 
certain

examples on cuda based GPU computer and on regular CPU and discuss the
results.
Cygwin was my first choice because i felt comfortable using it. But I 
think
this is gonna be harder then i expected. I guees i should give up 
Cygwin and

instal (maybe) UBUNTU on partition of my computer and try there. Any
suggestion there?
Thank you all again, you've been most kind.


I am most of the way through building bigdft under cygwin.  I have
no idea how the GPU aspect might work but here is what I've done
so far:

1) Download blas.tgz to ~/downloads (where I put things)
   In ~/tools (because I like it):
   tar xzvf ~/downloads/blas.tgz
   In ~/tools/BLAS:
   Edit make.inc as desired
   make
   cp blas_LINUX.a /usr/lib/libblas.a

2) Download lapack-3.4.2.tgz to ~/downloads
   In ~/tools, tar xzvf ~/downloads/lapack-3.4.2.tgz
   In ~/tools/lapack-3.4.2:
   cp make.inc.example make.inc
   Edit make.inc as desired; note that libblas.a is in /usr/lib, so
 you *must* edit that line
   make  [takes a LONG time]
   cp *.a /usr/lib

To run on Windows, shouldn't this .a files really be .dll's?


3) Download bigdft-1.6.0.tar.gz to ~/downloads
   In ~/tools, gunzip -c ~/downloads/bigdft-1.6.0.tar.gz | tar xvf -
   In ~/tools/bigdft-1.6.0:
   ./configure  (takes a while)
   make (takes quite a while)

This ultimately failed when linking, so something seems missing or
slightly off. I will try to look at it later.

On the other hand, setting up a Linux partition, or using
a Linux virtual machine under Windows, are reasonable options too.
If you're using Cygwin's gcc/fortran and linker I suspect you'll need 
.dll's not .a's.

--
Andrew DeFaria http://defaria.com
Madness takes its toll. Please have exact change.


--
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: real beginer

2012-10-23 Thread Andrew DeFaria

On 10/23/2012 12:46 PM, Trixie wrote:

I have liblapack-devel instaled and did ./configure and make . It took some
time but it finished.
Did make finish successfully, returning a 0 status? Did you have a 
bigdft.exe file? If you type ls bigdft do you see an executable? 
(Note: The file's name is actually bigdft.exe but ls will list it as 
bigdft).

  Problem happened when i tried to do this  tutotial
http://inac.cea.fr/L_Sim/BigDFT/tutorials/H1A_first_run.html   . It says
-bash: bigdft: command not found
The tutorial shows you doing an ls and it listing out two files: bigdft 
and posinp.xyz. Did you see those files? Cause your supposed to do that 
*before* you type in ./bigdft | tee N2.out. And you did include ./ 
before bigdft right?

I read somethere i shoud first do module load bigdft, but when I do that,
there is that module: command not found.
Module is not a command - period. The tutorial you pointed us to does 
not say you need to first do module load bigdft - in fact the word 
module does not appear on that page - so what lead you to believe you 
should first use a non-existent module command?

Currently I'm not using gpu (there is option to load cuda configure
--enable-cuda-gpu) I'm just trying to make sure this thing works at all.

--
Andrew DeFaria http://defaria.com
I got a new shadow. I had to get rid of the other one -- it wasn't doing 
what I was doing.



--
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: real beginer

2012-10-23 Thread Andrew DeFaria

On 10/23/2012 2:46 PM, Trixie wrote:

On 10/23/2012 12:46 PM, Trixie wrote:

I have liblapack-devel instaled and did ./configure and make . It took
some
time but it finished.

Did make finish successfully, returning a 0 status? Did you have a
bigdft.exe file? If you type ls bigdft do you see an executable?
(Note: The file's name is actually bigdft.exe but ls will list it as
bigdft).

/i type ls bigdft and there's No such file or directory and i cant find
bigdft.exe file anywhere. That means install and make didnt finish well,
right?

Probably. You could do something like: make; echo Status from make was $?

The $? is the return status from the previous command. That will only 
tell you if the make turned 0 for success. The output of make would be 
much more instructive.

posinp.xyz is there./

AFAICT posinp.xyz is not produced from the make.

You really should approach the people who maintain this package and ask 
them about it. This package is not Cygwin.

--
Andrew DeFaria http://defaria.com
By the time you make ends meet, they move the ends.


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



  1   2   3   4   5   6   7   8   9   10   >