After cygwin update, all files are created with +x flag

2015-10-03 Thread Michal Wysocki
Hi

While installing some packages I've accidentally updated my whole cygwin
from 1.7.29 to 2.1.1.

>From what I've found, around 1.7.34/35 there was some big change in ACL
handling.

Now, all my files and directories created in old cygwin (kernel build tree,
cygwin /etc folder etc.) have totally messed up permissions. Essentially
all files have 0774.

Also all new files created by touch, scripts, compilers etc., end up with
executable flag set:

$ touch test
$ getfacl -a test
# file: test
# owner: Misiek
# group: None
user::rw-
group::r--
group:Uzytkownicy uwierzytelnieni:rwx // Authenticated users
group:SYSTEM:rwx
group:Administratorzy:rwx // Admins
group:Uzytkownicy:r-x // Users
mask:rwx
other:r--
$ ls -l test
-rwxrwxr--+ 1 Misiek None 0 10-03 11:33 test


Of course everything still works, but is it new expected behavior? I'm not
sure if I really understand windows ACL, but this change in how cygwin
handles them is really disruptive...

Is there a tool / way to convert permissions on all my work folders/files,
so they are interpreted by new cygwin the same way as old one did?

Thanks
Michal


--
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: After cygwin update, all files are created with +x flag

2015-10-03 Thread Ken Brown

On 10/3/2015 6:07 AM, Michal Wysocki wrote:

Hi

While installing some packages I've accidentally updated my whole cygwin
from 1.7.29 to 2.1.1.

 From what I've found, around 1.7.34/35 there was some big change in ACL
handling.

Now, all my files and directories created in old cygwin (kernel build tree,
cygwin /etc folder etc.) have totally messed up permissions. Essentially
all files have 0774.

Also all new files created by touch, scripts, compilers etc., end up with
executable flag set:

$ touch test
$ getfacl -a test
# file: test
# owner: Misiek
# group: None
user::rw-
group::r--
group:Uzytkownicy uwierzytelnieni:rwx // Authenticated users
group:SYSTEM:rwx
group:Administratorzy:rwx // Admins
group:Uzytkownicy:r-x // Users
mask:rwx
other:r--
$ ls -l test
-rwxrwxr--+ 1 Misiek None 0 10-03 11:33 test


Of course everything still works, but is it new expected behavior? I'm not
sure if I really understand windows ACL, but this change in how cygwin
handles them is really disruptive...

Is there a tool / way to convert permissions on all my work folders/files,
so they are interpreted by new cygwin the same way as old one did?


setfacl -b

See https://cygwin.com/faq/faq.html#faq.using.ssh-pubkey-stops-working .

Ken


--
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: New C compilation error using the Openwindow/xview-devel toolkit on current (September 2015) 32 bit Cygwin

2015-10-03 Thread Jon Turney

On 01/10/2015 21:20, Ken Brown wrote:

On 10/1/2015 2:38 PM, Paul Morgan wrote:

I can no longer compile C code linked to the Openwindows/xview-devel
toolkit using gcc in Cygwin 32 bits, installed on Windows 7 32 or 64
bit systems. I run setup-x86 weekly to update Cygwin - compilation ran
fine in August 2015 but by mid September 2015 it was failing on the
same code.

I can reproduce this by compiling C code from the xview-examples
package (from e.g., Debian i386
https://packages.debian.org/jessie/xview-examples ), to eliminate any
issues with my specific code. For example,

[..]

Thanks for reporting this issue, with reproduction steps and a fix!

I've rebuilt and uploaded updated xview 3.2p1.4-28-2 packages (32-bit 
only, of course), with the additional patch [1] applied.


It's nice to know that someone is actually using the xview packages :)

Please let me know if there are any problems.

[1] 
https://github.com/jon-turney/xview-cygport/blob/master/cygwin-ucontext.patch



There now appears to be an issue with the definition of ucontext_t in
xview-devel with respect to Cygwin. If I manually edit
/usr/openwin/include/xview/base.h and change line 70 from undef to
#define SYSV_UCONTEXT
... the example above then compiles fine.

I cannot find any reference to recent Cygwin updates related to the
definition of ucontext_t


https://cygwin.com/ml/cygwin-announce/2015-08/msg00033.html


Yes, cygwin has only gained ucontext_t this year.


--
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: After cygwin update, all files are created with +x flag

2015-10-03 Thread cyg Simple
On 10/3/2015 8:46 AM, Ken Brown wrote:
> 
> See https://cygwin.com/faq/faq.html#faq.using.ssh-pubkey-stops-working .
> 

Why would a user such as the OP look for this id in the FAQ as an answer
to his problem?  Shouldn't there be a section for "ACL and File
Permissions Wrong After Upgrade"?  Sure it could point to the SSH entry
but it is a different question.

-- 
cyg Simple

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



Regression with gnu screen: Scrollbar gone between 4.02 and 4.03

2015-10-03 Thread Henry S. Thompson
To reproduce:
  1) Update screen package to current (4.03) version;
  2) Run screen inside mintty;
  3) Generate enough text to fill the screen and start scrolling
  4) Click in the scrollbar, or use the mousewheel
Desired effect
  Scrolling
Observed effect
  Nothing, wrt scrollbar; history review, wrt mousewheel

Reverting to 4.02 fixes the problem.

Expermentation suggests this does _not_ arise because of the small
change in the default screenrc between 4.02 and 4.03, as just
reverting that change does not solve the problem, and reverting to the
4.02 .exe _does_ solve the problem regardless of which screenrc is
used.

mintty version 2.1.5, Cygwin1.dll 2.2.1, 64-bit

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

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



Specifying package version in command line of setup

2015-10-03 Thread Alexey Sokolov
Hi

When gcc-5 was uploaded (as test), gcc-4 broke:

C:/cygwin-root/lib/gcc/i686-pc-cygwin/4.9.3/cc1plus.exe: error while
loading shared libraries: cygisl-10.dll: cannot open shared object file:
No such file or directory

I'm using this to install cygwin:
setup-x86.exe --quiet-mode ... --packages automake,gcc-g++,...

But it installs gcc-4, because gcc-5 is marked as test version.

Is there some way to specify on command line:
* which version of which package I want to install,
* or to enable installation of test versions?

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



strange cygwin sshd user generated (user name includes machine name)

2015-10-03 Thread Peter Moore
Hi,

I have a powershell script for installing cygwin and setting up sshd which I am 
using as UserData when firing up a Windows 2012 R2 instance in AWS EC2.

The same command succeeds when run manually, but fails when called from 
automation. I’m trying to understand what it is that is different, so I can fix 
it in automation.

The command called is:

ssh-host-config -y -c 'ntsec mintty' -u 'cygwinsshd' -w 'qwe123QWE!@#'

When I run manually, logged in as Administrator, I get a log line like this 
(notice the correct “Cygwin name”):

*** Query: Create new privileged user account 'WIN-EFPDIM0SAUP\cygwinsshd' 
(Cygwin name: ‘cygwinsshd')? (yes/no) yes

When I run from automation, the log line looks like this (notice the incorrect 
“Cygwin name”):

*** Query: Create new privileged user account 'WIN-EFPDIM0SAUP\cygwinsshd' 
(Cygwin name: 'win-efpdim0saup+cygwinsshd')? (yes/no) yes

It seems the extended “Cygwin name” which I get in automation causes 
ssh-host-config to fail. I’m trying to establish what causes the cygwin name to 
get the prefix of the machine name, since this seems to cause the problem.

For reference, below I’ve put the logs in both the successful (manual) case, 
and the failing (automated) case.

If anyone can point me to the source code of ssh-host-config I’m also happy to 
dig - I couldn’t find it online. So if you’re not sure, but know where the 
source is, I’m happy to look.

Many thanks in advance!
Pete



SUCCESSFUL run (when executed manually):

*** Query: Create new privileged user account 'WIN-EFPDIM0SAUP\cygwinsshd' 
(Cygwin name: ‘cygwinsshd')? (yes/no) yes
*** Info: User ‘cygwinsshd' has been created with password 'qwe123QWE!@#'.
*** Info: If you change the password, please remember also to change the
*** Info: password for the installed services which use (or will soon use)
*** Info: the ‘cygwinsshd' account.

*** Info: The sshd service has been installed under the ‘cygwinsshd'
*** Info: account.  To start the service now, call `net start sshd' or
*** Info: `cygrunsrv -S sshd'.  Otherwise, it will start automatically
*** Info: after the next reboot.
*** Info: Host configuration finished. Have fun!


FAILED run (when called in automation):

*** Query: Create new privileged user account 'WIN-EFPDIM0SAUP\cygwinsshd' 
(Cygwin name: 'win-efpdim0saup+cygwinsshd')? (yes/no) yes
*** Info: User 'win-efpdim0saup+cygwinsshd' has been created with password 
'qwe123QWE!@#'.
*** Info: If you change the password, please remember also to change the
*** Info: password for the installed services which use (or will soon use)
*** Info: the 'win-efpdim0saup+cygwinsshd' account.

*** Warning: Setting password expiry for user 'win-efpdim0saup+cygwinsshd' 
failed!
*** Warning: Please check that password never expires or set it to your needs.
No user or group 'win-efpdim0saup+cygwinsshd' known.
*** Warning: Assigning the appropriate privileges to user 
'win-efpdim0saup+cygwinsshd' failed!
*** ERROR: There was a serious problem creating a privileged user.



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Specifying package version in command line of setup

2015-10-03 Thread Marco Atzeri

On 03/10/2015 19:08, Alexey Sokolov wrote:

Hi

When gcc-5 was uploaded (as test), gcc-4 broke:

C:/cygwin-root/lib/gcc/i686-pc-cygwin/4.9.3/cc1plus.exe: error while
loading shared libraries: cygisl-10.dll: cannot open shared object file:
No such file or directory


https://cygwin.com/cgi-bin2/package-cat.cgi?file=x86%2Flibisl10%2Flibisl10-0.11.1-2&grep=cygisl-10.dll

You can not have gcc-4 and ggc-5 installed at the same time with
setup.


I'm using this to install cygwin:
setup-x86.exe --quiet-mode ... --packages automake,gcc-g++,...

But it installs gcc-4, because gcc-5 is marked as test version.

Is there some way to specify on command line:
* which version of which package I want to install,
* or to enable installation of test versions?


not that I am aware of.


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



Re: strange cygwin sshd user generated (user name includes machine name)

2015-10-03 Thread Peter Moore
After a little bit more digging, I think the cygwin name is coming from the 
output of getent here:

https://cygwin.com/git/gitweb.cgi?p=cygwin-csih.git;a=blob;f=cygwin-service-installation-helper.sh;h=10ab4fb6d47803c9ffabdde51923fc2c3f0496bb;hb=7ca191bebb52ae414bb2a2e37ef22d94f2658dc7#l2705

At this point, I’m not sure what causes getent to return different values when 
run in automation, and when run manually. I wonder if there is some kind of 
race condition, such that some subsystem is still updating at the point I 
install cygwin sshd.

For reference, this is the powershell script, see lines 77 onwards:
https://hg.mozilla.org/try/file/4905af7c52e5/testing/taskcluster/worker_types/win2012r2/aws_userdata

Thanks!
Pete



> On 03 Oct 2015, at 19:12, Peter Moore  wrote:
> 
> Hi,
> 
> I have a powershell script for installing cygwin and setting up sshd which I 
> am using as UserData when firing up a Windows 2012 R2 instance in AWS EC2.
> 
> The same command succeeds when run manually, but fails when called from 
> automation. I’m trying to understand what it is that is different, so I can 
> fix it in automation.
> 
> The command called is:
> 
> ssh-host-config -y -c 'ntsec mintty' -u 'cygwinsshd' -w 'qwe123QWE!@#'
> 
> When I run manually, logged in as Administrator, I get a log line like this 
> (notice the correct “Cygwin name”):
> 
> *** Query: Create new privileged user account 'WIN-EFPDIM0SAUP\cygwinsshd' 
> (Cygwin name: ‘cygwinsshd')? (yes/no) yes
> 
> When I run from automation, the log line looks like this (notice the 
> incorrect “Cygwin name”):
> 
> *** Query: Create new privileged user account 'WIN-EFPDIM0SAUP\cygwinsshd' 
> (Cygwin name: 'win-efpdim0saup+cygwinsshd')? (yes/no) yes
> 
> It seems the extended “Cygwin name” which I get in automation causes 
> ssh-host-config to fail. I’m trying to establish what causes the cygwin name 
> to get the prefix of the machine name, since this seems to cause the problem.
> 
> For reference, below I’ve put the logs in both the successful (manual) case, 
> and the failing (automated) case.
> 
> If anyone can point me to the source code of ssh-host-config I’m also happy 
> to dig - I couldn’t find it online. So if you’re not sure, but know where the 
> source is, I’m happy to look.
> 
> Many thanks in advance!
> Pete
> 
> 
> 
> SUCCESSFUL run (when executed manually):
> 
> *** Query: Create new privileged user account 'WIN-EFPDIM0SAUP\cygwinsshd' 
> (Cygwin name: ‘cygwinsshd')? (yes/no) yes
> *** Info: User ‘cygwinsshd' has been created with password 'qwe123QWE!@#'.
> *** Info: If you change the password, please remember also to change the
> *** Info: password for the installed services which use (or will soon use)
> *** Info: the ‘cygwinsshd' account.
> 
> *** Info: The sshd service has been installed under the ‘cygwinsshd'
> *** Info: account.  To start the service now, call `net start sshd' or
> *** Info: `cygrunsrv -S sshd'.  Otherwise, it will start automatically
> *** Info: after the next reboot.
> *** Info: Host configuration finished. Have fun!
> 
> 
> FAILED run (when called in automation):
> 
> *** Query: Create new privileged user account 'WIN-EFPDIM0SAUP\cygwinsshd' 
> (Cygwin name: 'win-efpdim0saup+cygwinsshd')? (yes/no) yes
> *** Info: User 'win-efpdim0saup+cygwinsshd' has been created with password 
> 'qwe123QWE!@#'.
> *** Info: If you change the password, please remember also to change the
> *** Info: password for the installed services which use (or will soon use)
> *** Info: the 'win-efpdim0saup+cygwinsshd' account.
> 
> *** Warning: Setting password expiry for user 'win-efpdim0saup+cygwinsshd' 
> failed!
> *** Warning: Please check that password never expires or set it to your needs.
> No user or group 'win-efpdim0saup+cygwinsshd' known.
> *** Warning: Assigning the appropriate privileges to user 
> 'win-efpdim0saup+cygwinsshd' failed!
> *** ERROR: There was a serious problem creating a privileged user.
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: After cygwin update, all files are created with +x flag

2015-10-03 Thread Michal Wysocki
Dnia Sat, 3 Oct 2015 08:46:53 -0400, Ken Brown napisał(a):

> On 10/3/2015 6:07 AM, Michal Wysocki wrote:
> setfacl -b
> See https://cygwin.com/faq/faq.html#faq.using.ssh-pubkey-stops-working .

Huh, this explanation is really well hidden in FAQ ;)

I've already figured it out, but setfacl -b wasn't a cure in my case.

Cygwin implementation is missing two important options:
-h (do not follow symbolic links)
-R (recursive)

Second one is not a biggie, but this tool simply can't modify cygwin
symlink files (and I have hundreds of them scattered throughout work
folders).

I've fixed my folders by doing a copy of them inside 1.7.29 shell. Old
cygwin automatically created appropriate permissions for every file,
ignoring messy inherited ACL entries that I had in my work folders.   

But there is another catch. Using new cygwin, you can't really create
folders that you intend to use in cygwin via windows explorer (which was
never a problem). They will get ACL entries (inherited from top level
folder C:\ for example) with +x rights, and cygwin will pass these
additional entries to any file created inside that folder.

Well, you get smarter every day ;)

Cheers 
Michal


--
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: Specifying package version in command line of setup

2015-10-03 Thread Alexey Sokolov
> libisl10

Ah, that helped, thanks. This dependency is missing from gcc-4 though.

> You can not have gcc-4 and ggc-5 installed at the same time with
> setup.
> 

Yes, sure, I didn't try to install both at the same time. I wanted to
install some version which is working. Gcc-4 didn't run due to error
above, and I didn't find a way to install gcc-5 without GUI.

I thought that it's related to gcc-5 because of
https://cygwin.com/ml/cygwin/2015-09/msg00282.html
And before upload of gcc-5 to the archive, gcc-4 was working fine when
installed this way (just gcc-g++, without explicit libisl10)

>> Is there some way to specify on command line:
>> * which version of which package I want to install,
>> * or to enable installation of test versions?
> 
> not that I am aware of.
> 

This would enable me to install gcc-5, which is another way to
workaround problem of a non-working gcc-4. Such features would be useful
in other situations too.


--
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: Specifying package version in command line of setup

2015-10-03 Thread Ken Brown

On 10/3/2015 2:53 PM, Alexey Sokolov wrote:

libisl10


Ah, that helped, thanks. This dependency is missing from gcc-4 though.


I think the problem is that when JonY uploaded gcc-5, he inadvertently 
changed the dependencies of the gcc packages to those of gcc-5. 
Probably those packages should require the dependencies of both gcc-4 
and gcc-5.


Ken


--
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: After cygwin update, all files are created with +x flag

2015-10-03 Thread Andrey Repin
Greetings, Michal Wysocki!

> But there is another catch. Using new cygwin, you can't really create
> folders that you intend to use in cygwin via windows explorer (which was
> never a problem). They will get ACL entries (inherited from top level
> folder C:\ for example) with +x rights, and cygwin will pass these
> additional entries to any file created inside that folder.

Correction: it was never working right. Now it works better. Even if not the
same way as before.


-- 
With best regards,
Andrey Repin
Sunday, October 4, 2015 00:42:29

Sorry for my terrible english...


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