Re: Multiple installations and 3PPs

2005-01-25 Thread Roman
I did not know to much about mount and regtool in Cygwin.
As regtool is a Cygwin program and uses the Cygwin environment (am I 
wrong?) fiddling around in the registry seems to me like changing the 
car on the race track at full speed instead of going for a pitstop.
I seemed more save to me changing the registry entries when no Cygwin is 
running and therefore used DOS/Windows batches.

I wrote a collection of DOS/windows batch scripts, which do at least a 
convenient job of changing between installed Cygwin versions.
I seems to work with the two versions I have from my 3PP's (V1.2 and 
V1.5.10) but I have not been working with it extensively. So there might 
still be short comings.

I would like to place it some where everyone interested can download, 
modify and extend it. I do not want to create something like a project, 
simply provide it to people who might find it useful (added the 
description file).
Maybe there exists some download page for Cygwin additionals ?

Greets
Roman
Dick Repasky wrote:
On Fri, 21 Jan 2005, Christopher Faylor wrote:
On Fri, Jan 21, 2005 at 08:54:35AM -0500, Dick Repasky wrote:
Roman here is what I do.
1) Install first instance of cygwin.
2) Export the registry key HKEY_LOCAL_MACINE/.../Cygnus Solutions to a
  file. Use a filename that represents the install.
3) Delete the registry key.

As usual, everyone is impressed with the fact that they know that cygwin
uses registry keys and no one is thinking that they could use cygwin 
tools
to manipulate them.

Incorrect! As usual, everyone follows the path of least resistance to 
solve problems.  They take what they know and what they find out by 
reading and piece them together to form a solution.  From reading the 
available documentation on mount, amateurs like myself are very 
unlikely to conclude that mount can be used to switch between 
installed instances of cygwin.  Chances are that they do know 
something about the registry and they can easily figure out how cygwin 
makes use of them.  So, that's what they do.

If you want people to use mount, revise the documentation. Either make 
the statement explicitly and provide an example, or explain the 
workings of cygwin mounts and how cygwin starts clearly enough that 
readers can deduce for themselves that mount can be used.

Enjoy life,
Dick Repasky
-
Dick Repasky
Bioinformatics Support
UITS Cubicle 101.08
Indiana University
USA
[EMAIL PROTECTED]
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

A collection of batch scripts which change Cygwin between 
different versions.

Copyright (C) 2005  Roman Kellner, Cabtronix AG
www.cabtronix.ch

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

What is SetCyg.bat?

SetCyg.bat is a collection of DOS/Windows batch scripts which change
Cygwin installation between different versions.


Why SetCyg.bat?
---

Serveral toolchain provider start to use GCC with Cygwin on Windows machines.
Most provider test their toolchain with one specific Cygwin version and do not
support later versions of Cygwin with their toolchain (libraries etc.).
Since it is not possible to run more than one Cygwin environment at a time, at
least multiple installations and a convenient mechanism to switch between the
installed version is the goal of SetCyg.bat.


Files and directory structure:
--

CygVersion 
¦-- Switch
¦
¦-- V1-2  (example only)
¦
¦-- V1-5-10   (example only)
¦
¦-- Vn-n-n 

Files in CygVersion:
- General batch scripts: DelCygReg.reg, DelCygReg.bat, ReadCygReg.bat, 
SetCyg.bat,
 SetCygPath.bat, SetCygReg.bat, SetCygVers.bat, gpl.txt,
 readme.txt

Files in CygVersion\Switch:
- specific batch scripts to switch between versions

Files in CygVersion\V1-2:
- .reg files of version V1-2
- specific batch script which reads the .reg files.

Files in CygVersion\V1-5-10:
- .reg files of version V1-5-10
- specific batch script which reads the .reg files.

Files in CygVersion\Vn-n-n:
- .reg files of version Vn-n-n
- specific batch script which reads the .reg files.

INPORTANT:
The version directories 

Re: Multiple installations and 3PPs (FAQ alert)

2005-01-23 Thread Steve Munson
On Sat, 22 Jan 2005 11:32:08 -0800, Joshua Daniel Franklin wrote:

 I like the idea of it at least saving mounts. And the paths should work
 (note the bin). :)

The only thing I would change is to save the state of the mounts within 
the uninstall script (just before uninstalling), rather than the state 
at install time when /etc/postinstall/gen-uninst.sh was run.

I also added a warning at the beginning, since this performs such a 
drastic operation, even though the UN*X philosophy is to do what the 
user says, no matter what, as in rm * .o:

-- BEGIN gen-uninst.sh --
#!/bin/sh
CYGDIR=`/bin/cygpath -aw /`
cat  /uninstall.bat EOF
@echo Warning! This will remove all of Cygwin!
@echo Use Ctrl-C or Ctrl-Break now to abort. Any other key will continue.
@pause
$CYGDIR\\bin\\mount -m  %TEMP%\\saved-mounts.bat
$CYGDIR\\bin\\umount -s -A
$CYGDIR\\bin\\umount -A
copy $CYGDIR\\bin\\cygwin1.dll $CYGDIR\\bin\\regtool.exe %TEMP%
$CYGDIR\\bin\\rm -rf /
del /s $CYGDIR
%TEMP%\\regtool remove /HKLM/Software/Cygnus Solutions
%TEMP%\\regtool remove /HKCU/Software/Cygnus Solutions
del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe
EOF
--- END gen-uninst.sh ---

Steve

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



Re: Multiple installations and 3PPs (FAQ alert)

2005-01-23 Thread Igor Pechtchanski
On Sun, 23 Jan 2005, Steve Munson wrote:

 On Sat, 22 Jan 2005 11:32:08 -0800, Joshua Daniel Franklin wrote:

  I like the idea of it at least saving mounts. And the paths should work
  (note the bin). :)

 The only thing I would change is to save the state of the mounts within
 the uninstall script (just before uninstalling), rather than the state
 at install time when /etc/postinstall/gen-uninst.sh was run.

 I also added a warning at the beginning, since this performs such a
 drastic operation, even though the UN*X philosophy is to do what the
 user says, no matter what, as in rm * .o:

 -- BEGIN gen-uninst.sh --
 #!/bin/sh
 CYGDIR=`/bin/cygpath -aw /`
 cat  /uninstall.bat EOF
 @echo Warning! This will remove all of Cygwin!
 @echo Use Ctrl-C or Ctrl-Break now to abort. Any other key will continue.
 @pause
 $CYGDIR\\bin\\mount -m  %TEMP%\\saved-mounts.bat
 $CYGDIR\\bin\\umount -s -A
 $CYGDIR\\bin\\umount -A
 copy $CYGDIR\\bin\\cygwin1.dll $CYGDIR\\bin\\regtool.exe %TEMP%
 $CYGDIR\\bin\\rm -rf /
 del /s $CYGDIR
 %TEMP%\\regtool remove /HKLM/Software/Cygnus Solutions
 %TEMP%\\regtool remove /HKCU/Software/Cygnus Solutions
 del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe
 EOF
 --- END gen-uninst.sh ---

Ok, so now we have two new versions of this floating around: this and
http://cygwin.com/ml/cygwin/2005-01/msg01092.html.  The final solution
will, hopefully, combine the best features of both (mostly the output
messages/warnings, as they're the same otherwise, AFAICS).
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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



Re: Multiple installations and 3PPs (FAQ alert)

2005-01-22 Thread David Postill
On Sat, 22 Jan 2005 01:51:38 -0500 (EST), Igor Pechtchanski [EMAIL PROTECTED] 
wrote:

[]

| Should we, perhaps, provide a small 'uninstall' script, maybe in
| /usr/sbin, that would perform a umount and then use regtool to remove the
| registry key?  It could even be a .bat, which will enable it to delete all
| of Cygwin once the last Cygwin process exits...  A postinstall script
| could generate it, too, so that it contains explicit paths of the Cygwin
| root directory.  Something like
| 
| -- BEGIN gen-uninst.sh --
| #!/bin/sh
| CYGDIR=`/bin/cygpath -aw /`
| cat  /usr/sbin/uninstall.bat EOF
| $CYGDIR\\umount -s -A
| $CYGDIR\\umount -A
| copy $CYGDIR\\cygwin1.dll $CYGDIR\\regtool.exe %TEMP%
| $CYGDIR\\rm -rf /
| del /s $CYGDIR
| %TEMP%\\regtool remove /HKLM/Software/Cygnus Solutions
| %TEMP%\\regtool remove /HKCU/Software/Cygnus Solutions
| del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe
| EOF
| --- END gen-uninst.sh ---

Looks good to me. 

But perhaps an option to save the current mount points somewhere
would be useful in case the purpose of the uininstall is not removal 
for it's own sake but removal in order to perform a clean install, with 
subsequent restoration of the mount points.

In other words insert a mount -m command before the first umount.


-- 
davidp /
DavidPostill

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




Re: Multiple installations and 3PPs (FAQ alert)

2005-01-22 Thread Joshua Daniel Franklin
 On Sat, 22 Jan 2005 01:51:38 -0500 (EST), Igor Pechtchanski wrote:
 
 | Should we, perhaps, provide a small 'uninstall' script, maybe in
 | /usr/sbin, that would perform a umount and then use regtool to remove the
 | registry key?  It could even be a .bat, which will enable it to delete all
 | of Cygwin once the last Cygwin process exits...  A postinstall script
 | could generate it, too, so that it contains explicit paths of the Cygwin
 | root directory.  

I like the idea of it at least saving mounts. And the paths should work
(note the bin). :)

-- BEGIN gen-uninst.sh --
#!/bin/sh
CYGDIR=`/bin/cygpath -aw /`
mount -m  /saved-mounts.sh
cat  /uninstall.bat EOF
$CYGDIR\\bin\\umount -s -A
$CYGDIR\\bin\\umount -A
copy $CYGDIR\\bin\\cygwin1.dll $CYGDIR\\bin\\regtool.exe %TEMP%
copy $CYGDIR\\saved-mounts.sh %TEMP%
$CYGDIR\\bin\\rm -rf /
del /s $CYGDIR
%TEMP%\\regtool remove /HKLM/Software/Cygnus Solutions
%TEMP%\\regtool remove /HKCU/Software/Cygnus Solutions
del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe
EOF

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



Re: Multiple installations and 3PPs

2005-01-22 Thread Joshua Daniel Franklin
 How about a FAQ entry along the following lines:
 
 How do I save, restore, delete, or modify the Cygwin information stored
 in the registry?
 
 Currently Cygwin stores its mount table information in the registry.  It
 is recommended that you use the 'mount' and 'umount' commands to
 manipulate the mount information instead of directly modifying the
 registry.
 
 To save the mount information to a file for later restoration, use
 mount -m  mounts.txt.  To remove all mount information use umount
 -A.  To reincorporate saved mount information use eval mounts.txt.
 
 The mount -m command is actually intended to be a .bat, so it can
 be something like:
 
   c:\mount -m  mounts.bat # to record it


OK, I've added that one and one about building a live CD since that's
been coming up, too:

http://cygwin.com/faq/faq0.html#SEC24

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



Re: Multiple installations and 3PPs (FAQ alert)

2005-01-22 Thread Igor Pechtchanski
On Sat, 22 Jan 2005, Joshua Daniel Franklin wrote:

  On Sat, 22 Jan 2005 01:51:38 -0500 (EST), Igor Pechtchanski wrote:
 
  | Should we, perhaps, provide a small 'uninstall' script, maybe in
  | /usr/sbin, that would perform a umount and then use regtool to remove the
  | registry key?  It could even be a .bat, which will enable it to delete all
  | of Cygwin once the last Cygwin process exits...  A postinstall script
  | could generate it, too, so that it contains explicit paths of the Cygwin
  | root directory.

 I like the idea of it at least saving mounts. And the paths should work
 (note the bin). :)

Whoops!  Missed that.

However, the mounts should be saved *inside* uninstall.bat, using a
Windows path.  :-)
Also, since you're *uninstalling* Cygwin, the mounts should go into a
.bat, not a .sh, with a more suggestive name...

-- BEGIN gen-uninst.sh --
#!/bin/sh
CYGDIR=`/bin/cygpath -aw /`
cat  /uninstall.bat EOF
$CYGDIR\\bin\\mount -m  %TEMP%\\restore-mounts.bat
$CYGDIR\\bin\\umount -s -A
$CYGDIR\\bin\\umount -A
copy $CYGDIR\\bin\\cygwin1.dll $CYGDIR\\bin\\regtool.exe %TEMP%
copy $CYGDIR\\saved-mounts.sh %TEMP%
$CYGDIR\\bin\\rm -rf /
del /s $CYGDIR
%TEMP%\\regtool remove /HKLM/Software/Cygnus Solutions
%TEMP%\\regtool remove /HKCU/Software/Cygnus Solutions
del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe
echo Cygwin is now un-installed.
echo To restore the mounts later, run %TEMP%\\restore-mounts.bat
EOF
--- END gen-uninst.sh ---

HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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



Re: Multiple installations and 3PPs

2005-01-21 Thread Roman
Hi,
I ran into the same problem as other did with different Cygwin version 
used by different 3PP's.
I do not need to have them run simulanously (at least not by now), but 
need to switch between them in a convenient way, if anyhow possible.

Christopher Faylor metioned in his mail the following:
The cygwin developers know how to keep multiple versions of cygwin
around for testing purposes so there really is no reason to add code
just to accommodate people who are apparently using cygwin for
commercial purposes without bothering to think too much about how they
are installing it.

Since I am not a cygwin developer I am not too familiar with how Cygwin 
is installed and which registry entries matter.
Can anyone give hints or refer to cygwin documentation which entries are 
essential.

Or is the following approach a promising one:
1. Install the first Cygwin environement (e.g version 1.2)
2. Extend the installation path (e.g. C:\program\cygwin) and the 
registry entries with the key name Cygnus Solutions with a version 
extension (here -1-2).
3. Install the second Cygwin environement (e.g version 1.5.10)
4. Extend the installation path (e.g. C:\program\cygwin) and the 
registry entries with the key name Cygnus Solutions with a version 
extension. (here -1-5-10 )
5. Repeat step 3 and 4 for more Cygwin environements
6. Change the path name and the registry key name back to the original 
installation name for the version one wants to use. (manually or better 
write a script that doees the job)

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


RE: Multiple installations and 3PPs

2005-01-21 Thread Jörg Schaible
 Or is the following approach a promising one:
[snip]

Well, it was proposed once already, but nobody did the work:

Get rid of the registry entries completly. Cygwin could use something similar 
to /etc/fstab to manage its mount modes.

- Jörg

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



RE: Multiple installations and 3PPs

2005-01-21 Thread Chris January
 Well, it was proposed once already, but nobody did the work:
 
 Get rid of the registry entries completly. Cygwin could use 
 something similar to /etc/fstab to manage its mount modes.

And how do you know where / is mounted?

Chris


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



RE: Multiple installations and 3PPs

2005-01-21 Thread Hughes, Bill
Jörg Schaible wrote:
 Or is the following approach a promising one: [snip]
 
 Well, it was proposed once already, but nobody did the work:
 
 Get rid of the registry entries completly. Cygwin could use
 something similar to /etc/fstab to manage its mount modes.
How would it know where to find /etc/fstab?

Bill
-- 
   ___
  oo  // \\  De Chelonian Mobile
 (_,\/ \_/ \ TortoiseSVN
   \ \_/_\_/The coolest Interface to (Sub)Version Control
   /_/   \_\ http://tortoisesvn.tigris.org


This e-mail transmission is strictly confidential and intended solely
for the person or organisation to whom it is addressed. It may contain
privileged and confidential information and if you are not the intended
recipient, you must not copy, distribute or take any action in reliance
on it. If you have received this email in error, please reply to the
sender as soon as possible and delete the message. Please note that we
are able to, and reserve the right to, monitor e-mail communications
passing through our network.

The views expressed in this email are not that of the company unless
specified within the message.

The inclusion of this footnote indicates that the mail message and any
attachments have been checked for the presence of known viruses.

If you have any comments regarding our policy please direct them to
[EMAIL PROTECTED]

This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com


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



RE: Multiple installations and 3PPs

2005-01-21 Thread Jörg Schaible
Chris January wrote on Friday, January 21, 2005 12:04 PM:

 Well, it was proposed once already, but nobody did the work:
 
 Get rid of the registry entries completly. Cygwin could use
 something similar to /etc/fstab to manage its mount modes.
 
 And how do you know where / is mounted?

If you don't want to assume that /etc is a parallel directory to /bin, where 
you've loaded cygwin1.dll from, you can also
provide this configuration file directly at the location of the cygwin1.dll. 
This would also enable a mounted /etc.

- Jörg

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



Re: Multiple installations and 3PPs

2005-01-21 Thread Dick Repasky
Roman here is what I do.
1) Install first instance of cygwin.
2) Export the registry key HKEY_LOCAL_MACINE/.../Cygnus Solutions to a
   file. Use a filename that represents the install.
3) Delete the registry key.
4) If you installed to c:\cygwin, rename that to something else
   temporarily during the other installs.  Briefly, the installer
   is distracted by it even if you specify some other root directory
   for the second install.
5) Install a second instance of cygwin (someplace other than where the
   first was installed.
6) Save the registry keys for this install as in step 2.
7) Repeat steps 3, 5 and 6 as many times as you want.
8) Rename that original install back to C:\cygwin.
To switch installed instances:
1) Kill all cygwin processes (don't forget daemons like sshd and cron).
2) Double click on the registry key file of the instance that you want to
   run..
3) You are ready to go.
On Fri, 21 Jan 2005, Roman wrote:
Hi,
I ran into the same problem as other did with different Cygwin version used 
by different 3PP's.
I do not need to have them run simulanously (at least not by now), but need 
to switch between them in a convenient way, if anyhow possible.

Christopher Faylor metioned in his mail the following:
The cygwin developers know how to keep multiple versions of cygwin
around for testing purposes so there really is no reason to add code
just to accommodate people who are apparently using cygwin for
commercial purposes without bothering to think too much about how they
are installing it.

Since I am not a cygwin developer I am not too familiar with how Cygwin is 
installed and which registry entries matter.
Can anyone give hints or refer to cygwin documentation which entries are 
essential.

Or is the following approach a promising one:
1. Install the first Cygwin environement (e.g version 1.2)
2. Extend the installation path (e.g. C:\program\cygwin) and the registry 
entries with the key name Cygnus Solutions with a version extension (here 
-1-2).
3. Install the second Cygwin environement (e.g version 1.5.10)
4. Extend the installation path (e.g. C:\program\cygwin) and the registry 
entries with the key name Cygnus Solutions with a version extension. (here 
-1-5-10 )
5. Repeat step 3 and 4 for more Cygwin environements
6. Change the path name and the registry key name back to the original 
installation name for the version one wants to use. (manually or better write 
a script that doees the job)

Cheers
Roman
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/
-
Dick Repasky
Bioinformatics Support
UITS Cubicle 101.08
Indiana University
USA
[EMAIL PROTECTED]
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Multiple installations and 3PPs

2005-01-21 Thread Christopher Faylor
On Fri, Jan 21, 2005 at 08:54:35AM -0500, Dick Repasky wrote:
Roman here is what I do.

1) Install first instance of cygwin.
2) Export the registry key HKEY_LOCAL_MACINE/.../Cygnus Solutions to a
   file. Use a filename that represents the install.
3) Delete the registry key.

As usual, everyone is impressed with the fact that they know that cygwin
uses registry keys and no one is thinking that they could use cygwin tools
to manipulate them.

If you need to have two installations, then you can use mount to switch
back and forth.  No need to muck with the registry.

cgf

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



Re: Multiple installations and 3PPs

2005-01-21 Thread Dick Repasky
On Fri, 21 Jan 2005, Christopher Faylor wrote:
On Fri, Jan 21, 2005 at 08:54:35AM -0500, Dick Repasky wrote:
Roman here is what I do.
1) Install first instance of cygwin.
2) Export the registry key HKEY_LOCAL_MACINE/.../Cygnus Solutions to a
  file. Use a filename that represents the install.
3) Delete the registry key.
As usual, everyone is impressed with the fact that they know that cygwin
uses registry keys and no one is thinking that they could use cygwin tools
to manipulate them.
Incorrect! As usual, everyone follows the path of least resistance to 
solve problems.  They take what they know and what they find out by 
reading and piece them together to form a solution.  From reading the 
available documentation on mount, amateurs like myself are very unlikely 
to conclude that mount can be used to switch between installed instances 
of cygwin.  Chances are that they do know something about the registry and 
they can easily figure out how cygwin makes use of them.  So, that's what 
they do.

If you want people to use mount, revise the documentation. Either make the 
statement explicitly and provide an example, or explain the workings of 
cygwin mounts and how cygwin starts clearly enough that readers can 
deduce for themselves that mount can be used.

Enjoy life,
Dick Repasky
-
Dick Repasky
Bioinformatics Support
UITS Cubicle 101.08
Indiana University
USA
[EMAIL PROTECTED]
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/


Re: Multiple installations and 3PPs

2005-01-21 Thread Christopher Faylor
On Fri, Jan 21, 2005 at 06:11:12PM -0500, Dick Repasky wrote:
On Fri, 21 Jan 2005, Christopher Faylor wrote:
On Fri, Jan 21, 2005 at 08:54:35AM -0500, Dick Repasky wrote:
Roman here is what I do.

1) Install first instance of cygwin.  2) Export the registry key
HKEY_LOCAL_MACINE/.../Cygnus Solutions to a file.  Use a filename that
represents the install.  3) Delete the registry key.

As usual, everyone is impressed with the fact that they know that
cygwin uses registry keys and no one is thinking that they could use
cygwin tools to manipulate them.

Incorrect! As usual, everyone follows the path of least resistance to
solve problems.  They take what they know and what they find out by
reading and piece them together to form a solution.  From reading the
available documentation on mount, amateurs like myself are very
unlikely to conclude that mount can be used to switch between installed
instances of cygwin.  Chances are that they do know something about the
registry and they can easily figure out how cygwin makes use of them.
So, that's what they do.

If you want people to use mount, revise the documentation.  Either make
the statement explicitly and provide an example, or explain the
workings of cygwin mounts and how cygwin starts clearly enough that
readers can deduce for themselves that mount can be used.

What documentation suggests that you should be modifying the registry
rather than using mount?  I'd be happy to change it.

As far as making the statement explicitly, I don't know what's going
on in your head.  I don't know what you find unclear.  Please enlighten
me with specific examples.  Perhaps I am missing something but when I
look in the documentation for descriptions of cygwin's mount table, I
see the mount command mentioned as the command to use to manipulate the
settings.  I would not be overly suprised to find that there is a
section which mentions the registry without mentioning the mount command
but if you have a precise example in mind, it will be fixed.

cgf

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



Re: Multiple installations and 3PPs

2005-01-21 Thread Brian Dessent
Christopher Faylor wrote:

 If you want people to use mount, revise the documentation.  Either make
 the statement explicitly and provide an example, or explain the
 workings of cygwin mounts and how cygwin starts clearly enough that
 readers can deduce for themselves that mount can be used.
 
 What documentation suggests that you should be modifying the registry
 rather than using mount?  I'd be happy to change it.

How about a FAQ entry along the following lines:

How do I save, restore, delete, or modify the Cygwin information stored
in the registry?

Currently Cygwin stores its mount table information in the registry.  It
is recommended that you use the 'mount' and 'umount' commands to
manipulate the mount information instead of directly modifying the
registry.

To save the mount information to a file for later restoration, use
mount -m  mounts.txt.  To remove all mount information use umount
-A.  To reincorporate saved mount information use eval mounts.txt.

Brian

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



Re: Multiple installations and 3PPs

2005-01-21 Thread Larry Hall
At 10:24 PM 1/21/2005, you wrote:
On Fri, Jan 21, 2005 at 06:11:12PM -0500, Dick Repasky wrote:
On Fri, 21 Jan 2005, Christopher Faylor wrote:
On Fri, Jan 21, 2005 at 08:54:35AM -0500, Dick Repasky wrote:
Roman here is what I do.

1) Install first instance of cygwin.  2) Export the registry key
HKEY_LOCAL_MACINE/.../Cygnus Solutions to a file.  Use a filename that
represents the install.  3) Delete the registry key.

As usual, everyone is impressed with the fact that they know that
cygwin uses registry keys and no one is thinking that they could use
cygwin tools to manipulate them.

Incorrect! As usual, everyone follows the path of least resistance to
solve problems.  They take what they know and what they find out by
reading and piece them together to form a solution.  From reading the
available documentation on mount, amateurs like myself are very
unlikely to conclude that mount can be used to switch between installed
instances of cygwin.  Chances are that they do know something about the
registry and they can easily figure out how cygwin makes use of them.
So, that's what they do.

If you want people to use mount, revise the documentation.  Either make
the statement explicitly and provide an example, or explain the
workings of cygwin mounts and how cygwin starts clearly enough that
readers can deduce for themselves that mount can be used.

What documentation suggests that you should be modifying the registry
rather than using mount?  I'd be happy to change it.

As far as making the statement explicitly, I don't know what's going
on in your head.  I don't know what you find unclear.  Please enlighten
me with specific examples.  Perhaps I am missing something but when I
look in the documentation for descriptions of cygwin's mount table, I
see the mount command mentioned as the command to use to manipulate the
settings.  I would not be overly suprised to find that there is a
section which mentions the registry without mentioning the mount command
but if you have a precise example in mind, it will be fixed.


Perhaps this was the reference Dick had in mind?

How do I uninstall all of Cygwin?
http://cygwin.com/faq/faq_toc.html#TOC20



--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (508) 893-9889 - FAX
Holliston, MA 01746 


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



Re: Multiple installations and 3PPs (FAQ alert)

2005-01-21 Thread Christopher Faylor
On Fri, Jan 21, 2005 at 11:17:30PM -0500, Larry Hall wrote:
Perhaps this was the reference Dick had in mind?

How do I uninstall all of Cygwin?
http://cygwin.com/faq/faq_toc.html#TOC20

Perhaps.

Joshua, if you have a chance, could you add something about using mount
to remove the options.  Of course, this might be sort of a chicken/egg
thing.

You could do something like:

mount --remove-all-mounts

Then use My Computer to delete the cygwin directory.

This would still leave an Cygnus Solutions key in the registry, though.

cgf

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



Re: Multiple installations and 3PPs

2005-01-21 Thread Christopher Faylor
On Fri, Jan 21, 2005 at 08:23:53PM -0800, Brian Dessent wrote:
Christopher Faylor wrote:

 If you want people to use mount, revise the documentation.  Either make
 the statement explicitly and provide an example, or explain the
 workings of cygwin mounts and how cygwin starts clearly enough that
 readers can deduce for themselves that mount can be used.
 
 What documentation suggests that you should be modifying the registry
 rather than using mount?  I'd be happy to change it.

How about a FAQ entry along the following lines:

How do I save, restore, delete, or modify the Cygwin information stored
in the registry?

Currently Cygwin stores its mount table information in the registry.  It
is recommended that you use the 'mount' and 'umount' commands to
manipulate the mount information instead of directly modifying the
registry.

To save the mount information to a file for later restoration, use
mount -m  mounts.txt.  To remove all mount information use umount
-A.  To reincorporate saved mount information use eval mounts.txt.

The mount -m command is actually intended to be a .bat, so it can
be something like:

  c:\mount -m  mounts.bat # to record it
  .
  .
  .
  c:\.\mounts  # to restore it

Other than that, I like the wording.

cgf

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



Re: Multiple installations and 3PPs (FAQ alert)

2005-01-21 Thread Igor Pechtchanski
On Fri, 21 Jan 2005, Christopher Faylor wrote:

 On Fri, Jan 21, 2005 at 11:17:30PM -0500, Larry Hall wrote:
 Perhaps this was the reference Dick had in mind?
 
 How do I uninstall all of Cygwin?
 http://cygwin.com/faq/faq_toc.html#TOC20

 Perhaps.

 Joshua, if you have a chance, could you add something about using mount
 to remove the options.  Of course, this might be sort of a chicken/egg
 thing.

 You could do something like:

 mount --remove-all-mounts

 Then use My Computer to delete the cygwin directory.

 This would still leave an Cygnus Solutions key in the registry, though.

 cgf

Should we, perhaps, provide a small 'uninstall' script, maybe in
/usr/sbin, that would perform a umount and then use regtool to remove the
registry key?  It could even be a .bat, which will enable it to delete all
of Cygwin once the last Cygwin process exits...  A postinstall script
could generate it, too, so that it contains explicit paths of the Cygwin
root directory.  Something like

-- BEGIN gen-uninst.sh --
#!/bin/sh
CYGDIR=`/bin/cygpath -aw /`
cat  /usr/sbin/uninstall.bat EOF
$CYGDIR\\umount -s -A
$CYGDIR\\umount -A
copy $CYGDIR\\cygwin1.dll $CYGDIR\\regtool.exe %TEMP%
$CYGDIR\\rm -rf /
del /s $CYGDIR
%TEMP%\\regtool remove /HKLM/Software/Cygnus Solutions
%TEMP%\\regtool remove /HKCU/Software/Cygnus Solutions
del %TEMP%\\cygwin1.dll %TEMP%\\regtool.exe
EOF
--- END gen-uninst.sh ---

(I don't recall whether the cygwin DLL will try to create the HKLM key or
only the HKCU key if none are present).
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse... -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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



Re: Multiple installations and 3PPs

2005-01-16 Thread Adrian Cox
On Sat, 2005-01-15 at 19:42 -0500, Arturus Magi wrote:
 Adrian Cox wrote:
 
So what are the other problems?
 
 Programs picking up the wrong version of the DLL and failing with little 
 or no explanation available to the user (whom will, likely as not, fail 
 to provide a useful report to the developer, if they bother to report it 
 at all), for one.

I know that with current Cygwin both instances will open the same shared
memory region but expect a different format of the contents. That's why
I proposed making each cygwin1.dll derive the name of the shared memory
region from its native WIN32 path. I'm interested in failures that would
still occur if the two cygwin DLLs used different shared memory regions
and registry keys.

-- 
Adrian Cox [EMAIL PROTECTED]


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



Re: Multiple installations and 3PPs

2005-01-16 Thread Christopher Faylor
On Sun, Jan 16, 2005 at 09:11:42AM +, Adrian Cox wrote:
I'm interested in failures that would still occur if the two cygwin
DLLs used different shared memory regions and registry keys.

You can satisfy your curiousity.  Remember this?
http://sources.redhat.com/ml/cygwin/2005-01/msg00730.html

I don't know if it has yet become obvious but this is not the first
time that someone has suggested that they want to do this.  I think
trying to make multiple versions interact is a bad idea, so I'm not
going to be doing any work in this regard.  Since you don't seem to
have engaged any of the other two cygwin developers, it seems like
your only alternative is to do the work yourself.

cgf

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



Re: Multiple installations and 3PPs

2005-01-15 Thread Arturus Magi
Adrian Cox wrote:
  So what are the other problems?
Programs picking up the wrong version of the DLL and failing with little 
or no explanation available to the user (whom will, likely as not, fail 
to provide a useful report to the developer, if they bother to report it 
at all), for one.

Alot of problems with pure-Windows programs result from Win32 not 
globally forcing this one-copy policy itself.

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


Re: Multiple installations and 3PPs

2005-01-14 Thread Christopher Faylor
On Fri, Jan 14, 2005 at 04:50:03PM +, Adrian Cox wrote:
Multiple installations of Cygwin clash, both over the registry name
used for the mount table and the name of the shared memory region.
This makes it difficult to have several versions for testing purposes,
and causes problems with software from 3PPs.

I don't know what 3PPs (third party providers?) might be but there is
only supposed to be one version of cygwin1.dll in use on your computer
at a time.  The DLL even issues a rather verbose error when it detects
two versions running.

Has anybody considered using PSAPI to find the full path to
cygwin1.dll, and using a hash of this path as the name of the shared
memory region and of the registry key?

This is rather like asking Has anyone found a way to put sound
deadening foam over the little thing that chimes when you're not wearing
your seatbelt?  The warnings are there for a reason, not because
we couldn't figure out how to name the shared memory region to avoid
clashes.  The problem isn't as simple as trying to avoid shared memory
clashes.

The cygwin developers know how to keep multiple versions of cygwin
around for testing purposes so there really is no reason to add code
just to accommodate people who are apparently using cygwin for
commercial purposes without bothering to think too much about how they
are installing it.

Usually when people suggest that we should modify cygwin to accommodate
their needs they haven't investigated the options that are available to
them.  It is really not that difficult to switch between two different
versions by setting the path and using the mount/unmount commands.  That
should be adequate for testing purposes.

If someone is providing a product which installs cygwin then they should
be as polite as possible and not impact an existing installation.  This
requires them to understand how things work, however, and some providers
do not want to bother with that, leaving their hapless end-users to
figure things out.  That's not very good customer support for the the
third party product providers, but it is rather common.

That said, however, If someone has an idea for a tool for the
distribution that would make things easier for the people who just want
to shut their eyes and release the dll, then it will certainly be
considered.  It should be almost as simple as just running cygcheck to
see if cygcheck detects existing registry keys and then checking to see
that the cygwin DLL exists in the standard place.

(I couldn't find anything with Google, but cygwin-developers isn't
indexed).

That's because cygwin-developers is a private mailing list.

cgf

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



RE: Multiple installations and 3PPs

2005-01-14 Thread Dave Korn
 -Original Message-
 From: cygwin-owner On Behalf Of Christopher Faylor
 Sent: 14 January 2005 17:16

 On Fri, Jan 14, 2005 at 04:50:03PM +, Adrian Cox wrote:
 Multiple installations of Cygwin clash, both over the registry name
 used for the mount table and the name of the shared memory region.
 This makes it difficult to have several versions for testing 
 purposes,
 and causes problems with software from 3PPs.
 
 I don't know what 3PPs (third party providers?) might be 


  Oh yes you do!

http://cygwin.com/acronyms#3PP



cheers, 
  DaveK
-- 
Can't think of a witty .sigline today


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



Re: Multiple installations and 3PPs

2005-01-14 Thread Christopher Faylor
On Fri, Jan 14, 2005 at 05:54:37PM -, Dave Korn wrote:
 -Original Message-
 From: cygwin-owner On Behalf Of Christopher Faylor
 Sent: 14 January 2005 17:16

 On Fri, Jan 14, 2005 at 04:50:03PM +, Adrian Cox wrote:
 Multiple installations of Cygwin clash, both over the registry name
 used for the mount table and the name of the shared memory region.
 This makes it difficult to have several versions for testing 
 purposes,
 and causes problems with software from 3PPs.
 
 I don't know what 3PPs (third party providers?) might be 

  Oh yes you do!

http://cygwin.com/acronyms#3PP

Wow.  I stand corrected.  How embarrassing.  I even snorted and
everything.

cgf

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



Re: Multiple installations and 3PPs

2005-01-14 Thread Adrian Cox
On Fri, 2005-01-14 at 12:15 -0500, Christopher Faylor wrote:
 On Fri, Jan 14, 2005 at 04:50:03PM +, Adrian Cox wrote:
 Multiple installations of Cygwin clash, both over the registry name
 used for the mount table and the name of the shared memory region.
 This makes it difficult to have several versions for testing purposes,
 and causes problems with software from 3PPs.
 
 I don't know what 3PPs (third party providers?) might be but there is
 only supposed to be one version of cygwin1.dll in use on your computer
 at a time.  The DLL even issues a rather verbose error when it detects
 two versions running.

Sorry, just trying to speak the local language:
http://cygwin.com/acronyms/#3PP

I don't understand why it is a goal to have only one version of
cygwin1.dll in use at a single time. I'd like to create separate Cygwin
universes, with no communication between them except via IP networking.

 Has anybody considered using PSAPI to find the full path to
 cygwin1.dll, and using a hash of this path as the name of the shared
 memory region and of the registry key?
 
 This is rather like asking Has anyone found a way to put sound
 deadening foam over the little thing that chimes when you're not wearing
 your seatbelt?  The warnings are there for a reason, not because
 we couldn't figure out how to name the shared memory region to avoid
 clashes.  The problem isn't as simple as trying to avoid shared memory
 clashes.

So what are the other problems? Is there any other way the processes
could become aware of each other's existence, except for making native
Win32 calls?

 [...]
 (I couldn't find anything with Google, but cygwin-developers isn't
 indexed).
 
 That's because cygwin-developers is a private mailing list.

Which is why people like me have to ask so many questions.

-- 
Adrian Cox [EMAIL PROTECTED]


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



Re: Multiple installations and 3PPs

2005-01-14 Thread Christopher Faylor
On Fri, Jan 14, 2005 at 06:07:52PM +, Adrian Cox wrote:
On Fri, 2005-01-14 at 12:15 -0500, Christopher Faylor wrote:

I don't understand why it is a goal to have only one version of
cygwin1.dll in use at a single time.  I'd like to create separate
Cygwin universes, with no communication between them except via IP
networking.

That is a very odd requirement.  It sounds like you should be
investigating vmware.  Either that or you are venturing into territory
beyond your current expertise or understanding.

OTOH, if you aren't installing any services, you could probably get away
with running cygwin under different accounts with user-mode mounts.

This is rather like asking Has anyone found a way to put sound
deadening foam over the little thing that chimes when you're not
wearing your seatbelt? The warnings are there for a reason, not
because we couldn't figure out how to name the shared memory region to
avoid clashes.  The problem isn't as simple as trying to avoid shared
memory clashes.

So what are the other problems?

Look at the source.  grep for multiple_cygwin_problem that will show you
most of the problem spots.

cgf

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