public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* case-sensitivity in cygwin problems and their patches
@ 2010-04-11 14:52 Shaddy Baddah
  2010-04-11 15:05 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Shaddy Baddah @ 2010-04-11 14:52 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

Hi,

As some may recall from a previous thread of mine, i turned on 
case-sensitivity in Windows + cygwin, as per:

http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive

I encountered two issues, for which i have provided the attached patches:

1. I found that there were no links to hosts, network, etc.. in /etc. 
Looking through the log files and the base-files-mketc.sh script that is 
meant to create them, I found that the reason that these were not 
created was related to case-sensitivity against the system32 directory. 
In Windows 7 and Vista at least, this directory name is capitalised to 
System32. This means that the directory existence test fails on case 
sensitivity. The attached patch corrects this.

2. I also found that the ssh-host-config script will have a non-fatal 
error when it tries to create a temporary mount to the drivers/etc 
subdirectory under System32 because of the same case-sensitivity issues. 
The attached patch also corrects this using the same utilisation of 
cygpath -S to get the System32 path.

Hope that helps,
Shaddy



[-- Attachment #2: base-files-3.9-3-sys32dir-patch.diff --]
[-- Type: text/plain, Size: 532 bytes --]

diff -x '*~' -urN ./base-files-3.9-3.orig/base-files-mketc.sh ./base-files-3.9-3/base-files-mketc.sh
--- ./base-files-3.9-3.orig/base-files-mketc.sh	2010-04-11 14:09:42.044274900 +0000
+++ ./base-files-3.9-3/base-files-mketc.sh	2010-04-11 14:38:08.617885400 +0000
@@ -9,8 +9,8 @@
 FILES="hosts protocols services networks"
 
 OSNAME="`/bin/uname -s`"
-WINHOME="`/bin/cygpath -w -W`"
-WINETC="$WINHOME\\system32\\drivers\\etc"
+WINSYS32HOME="`/bin/cygpath -S -w`"
+WINETC="$WINSYS32HOME\\drivers\\etc"
 
 if [ ! -d "$WINETC" ]
 then

[-- Attachment #3: openssh-5.4p1-1-sys32dir-patch.diff --]
[-- Type: text/plain, Size: 530 bytes --]

diff -x '*~' -urN ./openssh-5.4p1-1.orig/ssh-host-config ./openssh-5.4p1-1/ssh-host-config
--- ./openssh-5.4p1-1.orig/ssh-host-config	2010-04-11 13:47:56.576606400 +0000
+++ ./openssh-5.4p1-1/ssh-host-config	2010-04-11 13:51:10.300686800 +0000
@@ -78,7 +78,7 @@
 
   if csih_is_nt
   then
-    _win_etcdir="${SYSTEMROOT}\\system32\\drivers\\etc"
+    _win_etcdir="$(cygpath -S -w)\\drivers\\etc"
     _services="${_my_etcdir}/services"
     # On NT, 27 spaces, no space after the hash
     _spaces="                           #"


[-- Attachment #4: Type: text/plain, Size: 218 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: case-sensitivity in cygwin problems and their patches
  2010-04-11 14:52 case-sensitivity in cygwin problems and their patches Shaddy Baddah
@ 2010-04-11 15:05 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2010-04-11 15:05 UTC (permalink / raw)
  To: cygwin

On Apr 11 14:52, Shaddy Baddah wrote:
> Hi,
> 
> As some may recall from a previous thread of mine, i turned on
> case-sensitivity in Windows + cygwin, as per:
> 
> http://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive
> [...]
> 2. I also found that the ssh-host-config script will have a
> non-fatal error when it tries to create a temporary mount to the
> drivers/etc subdirectory under System32 because of the same
> case-sensitivity issues. The attached patch also corrects this using
> the same utilisation of cygpath -S to get the System32 path.
> [...]
> diff -x '*~' -urN ./openssh-5.4p1-1.orig/ssh-host-config ./openssh-5.4p1-1/ssh-host-config
> --- ./openssh-5.4p1-1.orig/ssh-host-config	2010-04-11 13:47:56.576606400 +0000
> +++ ./openssh-5.4p1-1/ssh-host-config	2010-04-11 13:51:10.300686800 +0000
> @@ -78,7 +78,7 @@
>  
>    if csih_is_nt
>    then
> -    _win_etcdir="${SYSTEMROOT}\\system32\\drivers\\etc"
> +    _win_etcdir="$(cygpath -S -w)\\drivers\\etc"
>      _services="${_my_etcdir}/services"
>      # On NT, 27 spaces, no space after the hash
>      _spaces="                           #"

This will be fixed differently in the ssh-host-config script in the
upcoming OpenSSH 5.5p1.  Instead of using cygpath to get the exact
correct case for the drivers/etc dir, it uses relaxed mount options.
The patch is already upstream for a couple of days.  Since 5.5p1
is due really soon now, I was too lazy to release an interim 5.4p1-2.


Index: contrib/cygwin/ssh-host-config
===================================================================
RCS file: /cvs/openssh/contrib/cygwin/ssh-host-config,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -p -r1.28 -r1.29
--- contrib/cygwin/ssh-host-config      12 Jul 2009 11:58:42 -0000      1.28
+++ contrib/cygwin/ssh-host-config      24 Mar 2010 02:03:32 -0000      1.29
@@ -90,7 +90,7 @@ update_services_file() {
   fi
   _serv_tmp="${_my_etcdir}/srv.out.$$"
 
-  mount -o text -f "${_win_etcdir}" "${_my_etcdir}"
+  mount -o text,posix=0,noacl -f "${_win_etcdir}" "${_my_etcdir}"
 
   # Depends on the above mount
   _wservices=`cygpath -w "${_services}"`


Corinna


-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-11 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-11 14:52 case-sensitivity in cygwin problems and their patches Shaddy Baddah
2010-04-11 15:05 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).