public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Ability to specify /cygdrive mount value in setup
@ 2015-11-25 19:06 Charlie
  2015-11-25 20:35 ` Andrey Repin
  0 siblings, 1 reply; 22+ messages in thread
From: Charlie @ 2015-11-25 19:06 UTC (permalink / raw)
  To: cygwin

Wed, 25 Nov 2015 19:39:08 Andrey wrote:

>>> You can precreate fstab, I think.

Yes I do this all the time.  If, for example, C:\cygwin64\etc\fstab already exists
when you run setup-x86_64.exe the first time, setup will use that /etc/fstab.
So all the links will be created during initial installation with / and not /cygdrive.



--
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] 22+ messages in thread

* Re: Ability to specify /cygdrive mount value in setup
  2015-11-25 19:06 Ability to specify /cygdrive mount value in setup Charlie
@ 2015-11-25 20:35 ` Andrey Repin
  2015-11-25 21:01   ` cyg Simple
  0 siblings, 1 reply; 22+ messages in thread
From: Andrey Repin @ 2015-11-25 20:35 UTC (permalink / raw)
  To: Charlie, cygwin

Greetings, Charlie!

> Wed, 25 Nov 2015 19:39:08 Andrey wrote:

>>>> You can precreate fstab, I think.

> Yes I do this all the time.  If, for example, C:\cygwin64\etc\fstab already exists
> when you run setup-x86_64.exe the first time, setup will use that /etc/fstab.
> So all the links will be created during initial installation with / and not /cygdrive.

Just which links we're talking about, yet again?...



-- 
With best regards,
Andrey Repin
Wednesday, November 25, 2015 23:24:47

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

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

* Re: Ability to specify /cygdrive mount value in setup
  2015-11-25 20:35 ` Andrey Repin
@ 2015-11-25 21:01   ` cyg Simple
  2015-11-25 22:44     ` Buchbinder, Barry (NIH/NIAID) [E]
  0 siblings, 1 reply; 22+ messages in thread
From: cyg Simple @ 2015-11-25 21:01 UTC (permalink / raw)
  To: cygwin

n 11/25/2015 3:25 PM, Andrey Repin wrote:
> Greetings, Charlie!
> 
>> Wed, 25 Nov 2015 19:39:08 Andrey wrote:
> 
>>>>> You can precreate fstab, I think.
> 
>> Yes I do this all the time.  If, for example, C:\cygwin64\etc\fstab already exists
>> when you run setup-x86_64.exe the first time, setup will use that /etc/fstab.
>> So all the links will be created during initial installation with / and not /cygdrive.
> 
> Just which links we're talking about, yet again?...
> 

find / -type l -exec ls -l {} \; | grep cygdrive

lrwxrwxrwx 1 cyg_Simple cyg_Simple 46 Nov 25 09:29 /etc/hosts ->
/cygdrive/c/WINDOWS/System32/drivers/etc/hosts
lrwxrwxrwx 1 cyg_Simple cyg_Simple 49 Nov 25 09:29 /etc/networks ->
/cygdrive/c/WINDOWS/System32/drivers/etc/networks
lrwxrwxrwx 1 cyg_Simple cyg_Simple 49 Nov 25 09:29 /etc/protocols ->
/cygdrive/c/WINDOWS/System32/drivers/etc/protocol
lrwxrwxrwx 1 cyg_Simple cyg_Simple 49 Nov 25 09:29 /etc/services ->
/cygdrive/c/WINDOWS/System32/drivers/etc/services

I also have the following which indicates that I modified /etc/fstab but
too late.

lrwxrwxrwx 1 cyg_Simple cyg_Simple 0 Nov 25 15:54 /proc/cygdrive -> /

If I were able to specify it at the start of setup this issue would not
be present.

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

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

* RE: Ability to specify /cygdrive mount value in setup
  2015-11-25 21:01   ` cyg Simple
@ 2015-11-25 22:44     ` Buchbinder, Barry (NIH/NIAID) [E]
  2015-11-26 13:52       ` Corinna Vinschen
  0 siblings, 1 reply; 22+ messages in thread
From: Buchbinder, Barry (NIH/NIAID) [E] @ 2015-11-25 22:44 UTC (permalink / raw)
  To: cygwin; +Cc: 'cyg Simple'

cyg Simple sent the following at Wednesday, November 25, 2015 3:59 PM
>>> Wed, 25 Nov 2015 19:39:08 Andrey wrote:
>>
>>>>>> You can precreate fstab, I think.
>>
>>> Yes I do this all the time.  If, for example, C:\cygwin64\etc\fstab already exists
>>> when you run setup-x86_64.exe the first time, setup will use that /etc/fstab.
>>> So all the links will be created during initial installation with / and not /cygdrive.
>>
>> Just which links we're talking about, yet again?...
>>
>
>n 11/25/2015 3:25 PM, Andrey Repin wrote:
>
>find / -type l -exec ls -l {} \; | grep cygdrive
>
>lrwxrwxrwx 1 cyg_Simple cyg_Simple 46 Nov 25 09:29 /etc/hosts ->
>/cygdrive/c/WINDOWS/System32/drivers/etc/hosts
>lrwxrwxrwx 1 cyg_Simple cyg_Simple 49 Nov 25 09:29 /etc/networks ->
>/cygdrive/c/WINDOWS/System32/drivers/etc/networks
>lrwxrwxrwx 1 cyg_Simple cyg_Simple 49 Nov 25 09:29 /etc/protocols ->
>/cygdrive/c/WINDOWS/System32/drivers/etc/protocol
>lrwxrwxrwx 1 cyg_Simple cyg_Simple 49 Nov 25 09:29 /etc/services ->
>/cygdrive/c/WINDOWS/System32/drivers/etc/services
>
>I also have the following which indicates that I modified /etc/fstab but
>too late.
>
>lrwxrwxrwx 1 cyg_Simple cyg_Simple 0 Nov 25 15:54 /proc/cygdrive -> /
>
>If I were able to specify it at the start of setup this issue would not
>be present.

It look like those links are created by /etc/postinstall/base-files-mketc.sh.
You could try just removing /etc/hosts, /etc/protocols, /etc/services, and
/etc/networks, being careful to delete the symlink and not the target, and
then re-run /etc/postinstall/base-files-mketc.sh.done.  After modifying
/etc/fstab, of course.

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

--
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] 22+ messages in thread

* Re: Ability to specify /cygdrive mount value in setup
  2015-11-25 22:44     ` Buchbinder, Barry (NIH/NIAID) [E]
@ 2015-11-26 13:52       ` Corinna Vinschen
  2015-11-26 18:06         ` Achim Gratz
  2015-12-06  9:47         ` Achim Gratz
  0 siblings, 2 replies; 22+ messages in thread
From: Corinna Vinschen @ 2015-11-26 13:52 UTC (permalink / raw)
  To: cygwin

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

On Nov 25 21:33, Buchbinder, Barry (NIH/NIAID) [E] wrote:
> cyg Simple sent the following at Wednesday, November 25, 2015 3:59 PM
> >>> Wed, 25 Nov 2015 19:39:08 Andrey wrote:
> >>
> >>>>>> You can precreate fstab, I think.
> >>
> >>> Yes I do this all the time.  If, for example, C:\cygwin64\etc\fstab already exists
> >>> when you run setup-x86_64.exe the first time, setup will use that /etc/fstab.
> >>> So all the links will be created during initial installation with / and not /cygdrive.
> >>
> >> Just which links we're talking about, yet again?...
> >>
> >
> >n 11/25/2015 3:25 PM, Andrey Repin wrote:
> >
> >find / -type l -exec ls -l {} \; | grep cygdrive
> >
> >lrwxrwxrwx 1 cyg_Simple cyg_Simple 46 Nov 25 09:29 /etc/hosts ->
> >/cygdrive/c/WINDOWS/System32/drivers/etc/hosts
> >lrwxrwxrwx 1 cyg_Simple cyg_Simple 49 Nov 25 09:29 /etc/networks ->
> >/cygdrive/c/WINDOWS/System32/drivers/etc/networks
> >lrwxrwxrwx 1 cyg_Simple cyg_Simple 49 Nov 25 09:29 /etc/protocols ->
> >/cygdrive/c/WINDOWS/System32/drivers/etc/protocol
> >lrwxrwxrwx 1 cyg_Simple cyg_Simple 49 Nov 25 09:29 /etc/services ->
> >/cygdrive/c/WINDOWS/System32/drivers/etc/services
> >
> >I also have the following which indicates that I modified /etc/fstab but
> >too late.
> >
> >lrwxrwxrwx 1 cyg_Simple cyg_Simple 0 Nov 25 15:54 /proc/cygdrive -> /
> >
> >If I were able to specify it at the start of setup this issue would not
> >be present.
> 
> It look like those links are created by /etc/postinstall/base-files-mketc.sh.
> You could try just removing /etc/hosts, /etc/protocols, /etc/services, and
> /etc/networks, being careful to delete the symlink and not the target, and
> then re-run /etc/postinstall/base-files-mketc.sh.done.  After modifying
> /etc/fstab, of course.

The right thing to do is to change the base-files package to utilize
/proc/cygdrive.  It's a vrtual symlink pointing to the actual cygdrive
prefix currently in use.  If these symlinks under /etc used the
/proc/cygdrive symlink, they would work all the time, independenly of
the actual cygdrive prefix.

Achim, any chance to tweak base-file accordingly?


Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: Ability to specify /cygdrive mount value in setup
  2015-11-26 13:52       ` Corinna Vinschen
@ 2015-11-26 18:06         ` Achim Gratz
  2015-11-26 20:08           ` Corinna Vinschen
                             ` (2 more replies)
  2015-12-06  9:47         ` Achim Gratz
  1 sibling, 3 replies; 22+ messages in thread
From: Achim Gratz @ 2015-11-26 18:06 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
> The right thing to do is to change the base-files package to utilize
> /proc/cygdrive.  It's a vrtual symlink pointing to the actual cygdrive
> prefix currently in use.  If these symlinks under /etc used the
> /proc/cygdrive symlink, they would work all the time, independenly of
> the actual cygdrive prefix.

I was thinking of using a native symlink, but going through the procfs
seems cleaner.

> Achim, any chance to tweak base-file accordingly?

Noted, but it might take a while.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

--
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] 22+ messages in thread

* Re: Ability to specify /cygdrive mount value in setup
  2015-11-26 18:06         ` Achim Gratz
@ 2015-11-26 20:08           ` Corinna Vinschen
  2015-11-29 18:25           ` cyg Simple
  2015-11-29 20:15           ` cyg Simple
  2 siblings, 0 replies; 22+ messages in thread
From: Corinna Vinschen @ 2015-11-26 20:08 UTC (permalink / raw)
  To: cygwin

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

On Nov 26 19:04, Achim Gratz wrote:
> Corinna Vinschen writes:
> > The right thing to do is to change the base-files package to utilize
> > /proc/cygdrive.  It's a vrtual symlink pointing to the actual cygdrive
> > prefix currently in use.  If these symlinks under /etc used the
> > /proc/cygdrive symlink, they would work all the time, independenly of
> > the actual cygdrive prefix.
> 
> I was thinking of using a native symlink, but going through the procfs
> seems cleaner.

Native symlinks are no safe bet since they require special permissions.
Won't work when running setup as non-admin user.

> > Achim, any chance to tweak base-file accordingly?
> 
> Noted, but it might take a while.


Thanks,
Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: Ability to specify /cygdrive mount value in setup
  2015-11-26 18:06         ` Achim Gratz
  2015-11-26 20:08           ` Corinna Vinschen
@ 2015-11-29 18:25           ` cyg Simple
  2015-11-29 20:15           ` cyg Simple
  2 siblings, 0 replies; 22+ messages in thread
From: cyg Simple @ 2015-11-29 18:25 UTC (permalink / raw)
  To: cygwin

On 11/26/2015 1:04 PM, Achim Gratz wrote:
> Corinna Vinschen writes:
>> The right thing to do is to change the base-files package to utilize
>> /proc/cygdrive.  It's a vrtual symlink pointing to the actual cygdrive
>> prefix currently in use.  If these symlinks under /etc used the
>> /proc/cygdrive symlink, they would work all the time, independenly of
>> the actual cygdrive prefix.
> 
> I was thinking of using a native symlink, but going through the procfs
> seems cleaner.
> 
>> Achim, any chance to tweak base-file accordingly?
> 
> Noted, but it might take a while.
> 

That should work.  Thanks for listening and working through the problem.

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

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

* Re: Ability to specify /cygdrive mount value in setup
  2015-11-26 18:06         ` Achim Gratz
  2015-11-26 20:08           ` Corinna Vinschen
  2015-11-29 18:25           ` cyg Simple
@ 2015-11-29 20:15           ` cyg Simple
  2 siblings, 0 replies; 22+ messages in thread
From: cyg Simple @ 2015-11-29 20:15 UTC (permalink / raw)
  To: cygwin

On 11/26/2015 1:04 PM, Achim Gratz wrote:
> Corinna Vinschen writes:
>> Achim, any chance to tweak base-file accordingly?
> 
> Noted, but it might take a while.
> 

That should work.  Thanks for listening and working through the problem.

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

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

* Re: Ability to specify /cygdrive mount value in setup
  2015-11-26 13:52       ` Corinna Vinschen
  2015-11-26 18:06         ` Achim Gratz
@ 2015-12-06  9:47         ` Achim Gratz
  2015-12-06 14:10           ` Corinna Vinschen
  1 sibling, 1 reply; 22+ messages in thread
From: Achim Gratz @ 2015-12-06  9:47 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
> The right thing to do is to change the base-files package to utilize
> /proc/cygdrive.  It's a vrtual symlink pointing to the actual cygdrive
> prefix currently in use.  If these symlinks under /etc used the
> /proc/cygdrive symlink, they would work all the time, independenly of
> the actual cygdrive prefix.

I've looked into it and I'd like to give that task back to the cygpath
maintainer. :-)

> Achim, any chance to tweak base-file accordingly?

At the moment I'm using $(/usr/bin/cygpath -S -u) to get the system
directory.  Since the /cygdrive prefix could be anything, I'd either
have to first figure it out via $(dirname $(/usr/bin/cygpath -u C:))
since the output from mount is a bit unwieldy.  Maybe we should just
force the cygdrive prefix to be /cygdrive for postinstall scripts
anyway.

But there really ought to be a way to simply have cygpath deliver the
canonical /proc/cygdrive path instead of whatever that link points to,
maybe that switch should be called "-U"?


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra

--
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] 22+ messages in thread

* Re: Ability to specify /cygdrive mount value in setup
  2015-12-06  9:47         ` Achim Gratz
@ 2015-12-06 14:10           ` Corinna Vinschen
  2015-12-06 14:28             ` Achim Gratz
  0 siblings, 1 reply; 22+ messages in thread
From: Corinna Vinschen @ 2015-12-06 14:10 UTC (permalink / raw)
  To: cygwin

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

On Dec  6 10:47, Achim Gratz wrote:
> Corinna Vinschen writes:
> > The right thing to do is to change the base-files package to utilize
> > /proc/cygdrive.  It's a vrtual symlink pointing to the actual cygdrive
> > prefix currently in use.  If these symlinks under /etc used the
> > /proc/cygdrive symlink, they would work all the time, independenly of
> > the actual cygdrive prefix.
> 
> I've looked into it and I'd like to give that task back to the cygpath
> maintainer. :-)
> 
> > Achim, any chance to tweak base-file accordingly?
> 
> At the moment I'm using $(/usr/bin/cygpath -S -u) to get the system
> directory.  Since the /cygdrive prefix could be anything, I'd either
> have to first figure it out via $(dirname $(/usr/bin/cygpath -u C:))
> since the output from mount is a bit unwieldy.  Maybe we should just
> force the cygdrive prefix to be /cygdrive for postinstall scripts
> anyway.

No offense, but you didn't understand what I mean, it seems.  Don't call
cygpath.  Just use /proc/cygdrive directly.  It's that simple.  While
the cygdrive prefix changes, /proc/cygdrive will *never* change.  E.g.

Substitute

  $(dirname $(/usr/bin/cygpath -u C:))

with

  /proc/cygdrive/c


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: Ability to specify /cygdrive mount value in setup
  2015-12-06 14:10           ` Corinna Vinschen
@ 2015-12-06 14:28             ` Achim Gratz
  2015-12-06 17:01               ` cyg Simple
                                 ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Achim Gratz @ 2015-12-06 14:28 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
> No offense, but you didn't understand what I mean, it seems.

I did, I think -- but read my request again.

> Don't call cygpath.  Just use /proc/cygdrive directly.  It's that
> simple.  While the cygdrive prefix changes, /proc/cygdrive will
> *never* change.  E.g.

I need cygpath to get the system directory (hint: it need not be in
C:\Windows\System32) and cygpath delivers that directory with the
cygdrive prefix and not /proc/cygpath prepended.  I wouldn't mind if all
those special directories would also be available via /proc/<whatever>,
which means I wouldn't even need to fork cygpath for getting there.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html

--
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] 22+ messages in thread

* Re: Ability to specify /cygdrive mount value in setup
  2015-12-06 14:28             ` Achim Gratz
@ 2015-12-06 17:01               ` cyg Simple
  2015-12-06 17:16                 ` Achim Gratz
  2015-12-06 17:12               ` Achim Gratz
  2015-12-06 19:02               ` Corinna Vinschen
  2 siblings, 1 reply; 22+ messages in thread
From: cyg Simple @ 2015-12-06 17:01 UTC (permalink / raw)
  To: cygwin

On 12/6/2015 9:28 AM, Achim Gratz wrote:
> Corinna Vinschen writes:
>> No offense, but you didn't understand what I mean, it seems.
> 
> I did, I think -- but read my request again.
> 
>> Don't call cygpath.  Just use /proc/cygdrive directly.  It's that
>> simple.  While the cygdrive prefix changes, /proc/cygdrive will
>> *never* change.  E.g.
> 
> I need cygpath to get the system directory (hint: it need not be in
> C:\Windows\System32) and cygpath delivers that directory with the
> cygdrive prefix and not /proc/cygpath prepended.  I wouldn't mind if all
> those special directories would also be available via /proc/<whatever>,
> which means I wouldn't even need to fork cygpath for getting there.
> 

Use the $WINDIR variable to find the Windows path and manipulate its
value to prepend /proc/cygdrive/ and suffix its value with /system32.
The system32 directory will always be in $WINDIR/sytem32.

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

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

* Re: Ability to specify /cygdrive mount value in setup
  2015-12-06 14:28             ` Achim Gratz
  2015-12-06 17:01               ` cyg Simple
@ 2015-12-06 17:12               ` Achim Gratz
  2015-12-06 19:02               ` Corinna Vinschen
  2 siblings, 0 replies; 22+ messages in thread
From: Achim Gratz @ 2015-12-06 17:12 UTC (permalink / raw)
  To: cygwin

Achim Gratz writes:
> I need cygpath to get the system directory (hint: it need not be in
> C:\Windows\System32) and cygpath delivers that directory with the
> cygdrive prefix and not /proc/cygpath prepended.  I wouldn't mind if all
> those special directories would also be available via /proc/<whatever>,
> which means I wouldn't even need to fork cygpath for getting there.

This will get me the correct path to link to, but I still think it's
unnecessarily ugly (and took a while to cover all the possibilities of
not-so-well-formed cygdrive prefixes):

--8<---------------cut here---------------start------------->8---
CYGDRIVE="$(/usr/bin/cygpath -u C:)"
WINETC="$(/usr/bin/cygpath -S -u)/drivers/etc"
WINETC="/proc/cygdrive/${WINETC#${CYGDRIVE%c}}"
--8<---------------cut here---------------end--------------->8---

versus the hypothetical

--8<---------------cut here---------------start------------->8---
WINETC="$(/usr/bin/cygpath -S -U)/drivers/etc"
--8<---------------cut here---------------end--------------->8---

BTW, the path comprising the cygdrive prefix probably needs to be
sanitized to avoid things like

--8<---------------cut here---------------start------------->8---
$ mount -c /bla//fasel////blum//////
--8<---------------cut here---------------end--------------->8---

leaking into the wild.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
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] 22+ messages in thread

* Re: Ability to specify /cygdrive mount value in setup
  2015-12-06 17:01               ` cyg Simple
@ 2015-12-06 17:16                 ` Achim Gratz
  0 siblings, 0 replies; 22+ messages in thread
From: Achim Gratz @ 2015-12-06 17:16 UTC (permalink / raw)
  To: cygwin

cyg Simple writes:
> Use the $WINDIR variable to find the Windows path and manipulate its
> value to prepend /proc/cygdrive/ and suffix its value with /system32.
> The system32 directory will always be in $WINDIR/sytem32.

That's just as ugly as the solution I have plus that one doesn't rely on
the environment being sane.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
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] 22+ messages in thread

* Re: Ability to specify /cygdrive mount value in setup
  2015-12-06 14:28             ` Achim Gratz
  2015-12-06 17:01               ` cyg Simple
  2015-12-06 17:12               ` Achim Gratz
@ 2015-12-06 19:02               ` Corinna Vinschen
  2015-12-06 19:07                 ` Achim Gratz
  2 siblings, 1 reply; 22+ messages in thread
From: Corinna Vinschen @ 2015-12-06 19:02 UTC (permalink / raw)
  To: cygwin

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

On Dec  6 15:28, Achim Gratz wrote:
> Corinna Vinschen writes:
> > No offense, but you didn't understand what I mean, it seems.
> 
> I did, I think -- but read my request again.
> 
> > Don't call cygpath.  Just use /proc/cygdrive directly.  It's that
> > simple.  While the cygdrive prefix changes, /proc/cygdrive will
> > *never* change.  E.g.
> 
> I need cygpath to get the system directory (hint: it need not be in
> C:\Windows\System32) and cygpath delivers that directory with the
> cygdrive prefix and not /proc/cygpath prepended.  I wouldn't mind if all
> those special directories would also be available via /proc/<whatever>,
> which means I wouldn't even need to fork cygpath for getting there.

Does https://cygwin.com/ml/cygwin-announce/2015-12/msg00005.html help?


Corinna

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

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: Ability to specify /cygdrive mount value in setup
  2015-12-06 19:02               ` Corinna Vinschen
@ 2015-12-06 19:07                 ` Achim Gratz
  0 siblings, 0 replies; 22+ messages in thread
From: Achim Gratz @ 2015-12-06 19:07 UTC (permalink / raw)
  To: cygwin

Corinna Vinschen writes:
>> I need cygpath to get the system directory (hint: it need not be in
>> C:\Windows\System32) and cygpath delivers that directory with the
>> cygdrive prefix and not /proc/cygpath prepended.  I wouldn't mind if all
>> those special directories would also be available via /proc/<whatever>,
>> which means I wouldn't even need to fork cygpath for getting there.
>
> Does https://cygwin.com/ml/cygwin-announce/2015-12/msg00005.html help?

Thank you very much, that makes such things a lot easier.  I'll release
the new base-files when Cygwin 2.4.0 is officially out.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf rackAttack:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
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] 22+ messages in thread

* RE: Ability to specify /cygdrive mount value in setup
  2015-11-25 17:39 ` Andrey Repin
@ 2015-11-25 19:17   ` Buchbinder, Barry (NIH/NIAID) [E]
  0 siblings, 0 replies; 22+ messages in thread
From: Buchbinder, Barry (NIH/NIAID) [E] @ 2015-11-25 19:17 UTC (permalink / raw)
  To: cygwin; +Cc: cyg Simple

Andrey Repin sent the following at Wednesday, November 25, 2015 11:39 AM
>On 11/25/2015 10:56 AM, cyg Simple wrote:
>> I find /cygdrive/ just unbearable and I always change it to / after an
>> install.  The issue with this is that post install activities will
>> create symlinks using /cygdrive moniker so I must go change those if I
>> find them.
>
>Just which activities? I haven't seen any. And I do remap /cygdrive to /
>at all times.

I grepped everything in and under /etc for cygdrive.  The only hits were
/etc/fstab and /etc/postinstall/000-cygwin-post-install.sh.done, and the
latter was just setting up the former.  So I have to ask, what's creating
these shortcuts?

The idea that setup or the post-install scripts create symlinks that
point to things that are not under / and need to be accessed as, for
example, /cygdrive/d (= D:\) seems very strange.

>> Would it be possible for setup to ask for the value and
>> setup the /etc/fstab with the value?  Do others find this bit of annoying?
>
>You can precreate fstab, I think.

Maybe you could do a 3-step install?
  -  minimal install.
  -  fix fstab.
  -  install optional packages.

Another (partially tested) idea:  Create a folder in / named /cygdrive.
Then create a symlink in it for each drive, where the symlink points to
the drive and is named as the drive letter.  That seems to work for
some purposes, e.g., cd /cygdrive/d/dir/ goes to /d, though the CWD will
be /cygdrive/d/dir, not /d/DIR.  YMMV.

But pre-creating c:\cygwin\etc\fstab seems like the best option.

Good Luck.

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

--
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] 22+ messages in thread

* Re: Ability to specify /cygdrive mount value in setup
  2015-11-25 16:24 cyg Simple
  2015-11-25 16:50 ` Eliot Moss
  2015-11-25 17:39 ` Andrey Repin
@ 2015-11-25 18:51 ` Roger Wells
  2 siblings, 0 replies; 22+ messages in thread
From: Roger Wells @ 2015-11-25 18:51 UTC (permalink / raw)
  To: cygwin

On 11/25/2015 10:56 AM, cyg Simple wrote:
> Friends,
> 
> I find /cygdrive/ just unbearable and I always change it to / after an
> install.  The issue with this is that post install activities will
> create symlinks using /cygdrive moniker so I must go change those if I
> find them.  Would it be possible for setup to ask for the value and
> setup the /etc/fstab with the value?  Do others find this bit of annoying?
> 

yep

-- 
Roger Wells, P.E.
leidos
221 Third St
Newport, RI 02840
401-847-4210 (voice)
401-849-1585 (fax)
roger.k.wells@leidos.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

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

* Re: Ability to specify /cygdrive mount value in setup
  2015-11-25 16:24 cyg Simple
  2015-11-25 16:50 ` Eliot Moss
@ 2015-11-25 17:39 ` Andrey Repin
  2015-11-25 19:17   ` Buchbinder, Barry (NIH/NIAID) [E]
  2015-11-25 18:51 ` Roger Wells
  2 siblings, 1 reply; 22+ messages in thread
From: Andrey Repin @ 2015-11-25 17:39 UTC (permalink / raw)
  To: cyg Simple, cygwin

Greetings, cyg Simple!

> I find /cygdrive/ just unbearable and I always change it to / after an
> install.  The issue with this is that post install activities will
> create symlinks using /cygdrive moniker so I must go change those if I
> find them.

Just which activities?
I haven't seen any. And I do remap /cygdrive to / at all times.

> Would it be possible for setup to ask for the value and
> setup the /etc/fstab with the value?  Do others find this bit of annoying?

You can precreate fstab, I think.


-- 
With best regards,
Andrey Repin
Wednesday, November 25, 2015 19:38:07

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

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

* Re: Ability to specify /cygdrive mount value in setup
  2015-11-25 16:24 cyg Simple
@ 2015-11-25 16:50 ` Eliot Moss
  2015-11-25 17:39 ` Andrey Repin
  2015-11-25 18:51 ` Roger Wells
  2 siblings, 0 replies; 22+ messages in thread
From: Eliot Moss @ 2015-11-25 16:50 UTC (permalink / raw)
  To: cygwin

On 11/25/2015 10:56 AM, cyg Simple wrote:

> I find /cygdrive/ just unbearable and I always change it to / after an
> install.  The issue with this is that post install activities will
> create symlinks using /cygdrive moniker so I must go change those if I
> find them.  Would it be possible for setup to ask for the value and
> setup the /etc/fstab with the value?  Do others find this bit of annoying?

I just create symlinks so that in the cygwin universe /c means /cygdrive/c,
etc.  So, not a link of /, but individual links for the drives I use.
These survive updates, anyway.  It's been a long time since I've wiped
everything and installed from scratch, though.  If that's what you're
talking about, then my suggestion would not be helpful ...

Regards -- Eliot Moss

--
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] 22+ messages in thread

* Ability to specify /cygdrive mount value in setup
@ 2015-11-25 16:24 cyg Simple
  2015-11-25 16:50 ` Eliot Moss
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: cyg Simple @ 2015-11-25 16:24 UTC (permalink / raw)
  To: cygwin

Friends,

I find /cygdrive/ just unbearable and I always change it to / after an
install.  The issue with this is that post install activities will
create symlinks using /cygdrive moniker so I must go change those if I
find them.  Would it be possible for setup to ask for the value and
setup the /etc/fstab with the value?  Do others find this bit of annoying?

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

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

end of thread, other threads:[~2015-12-06 19:07 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-25 19:06 Ability to specify /cygdrive mount value in setup Charlie
2015-11-25 20:35 ` Andrey Repin
2015-11-25 21:01   ` cyg Simple
2015-11-25 22:44     ` Buchbinder, Barry (NIH/NIAID) [E]
2015-11-26 13:52       ` Corinna Vinschen
2015-11-26 18:06         ` Achim Gratz
2015-11-26 20:08           ` Corinna Vinschen
2015-11-29 18:25           ` cyg Simple
2015-11-29 20:15           ` cyg Simple
2015-12-06  9:47         ` Achim Gratz
2015-12-06 14:10           ` Corinna Vinschen
2015-12-06 14:28             ` Achim Gratz
2015-12-06 17:01               ` cyg Simple
2015-12-06 17:16                 ` Achim Gratz
2015-12-06 17:12               ` Achim Gratz
2015-12-06 19:02               ` Corinna Vinschen
2015-12-06 19:07                 ` Achim Gratz
  -- strict thread matches above, loose matches on Subject: below --
2015-11-25 16:24 cyg Simple
2015-11-25 16:50 ` Eliot Moss
2015-11-25 17:39 ` Andrey Repin
2015-11-25 19:17   ` Buchbinder, Barry (NIH/NIAID) [E]
2015-11-25 18:51 ` Roger Wells

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