Thread: Simplifying Cygwin PosgreSQL Installation
We have a project (http://www.mines.edu/research/ccre) for which we would very much like to use Cygwin PostgreSQL instead of Access. I'll call this project "the Workbench". We are in the process of releasing this code under the GPL and use PostgreSQL for our Linux version. Our problem (my responsibility) is in trying to make the Workbench easy to install and the main barrier to using Cygwin PosgreSQL is that it is (relatively) difficult to install. While Cygwin's setup.exe is a nice piece of work from my point of view, it is too intimidating for our Windows users, not to mention the additional cygipc installation. I've thought about hacking setup.exe to provide a simpler interface, but this is likely to corrupt existing Cygwin installations, or have upgrades incompatible with the Workbench, etc. It seems that the best solution would be to provide a self-contained Cygwin PostgreSQL installation that works independently of a previously existing installation. I've played around a little with this in a naive way, and can get by with just a few files (including cygwin1.dll, of course) in addition to the PostgreSQL files. However, postmaster tries to write a lock file to /tmp and apparently its looking outside of my toy installation. Comments or solutions? Thanks, Glenn Murray http://www.mines.edu/~gmurray
Glenn, On Tue, Oct 22, 2002 at 11:14:36AM -0600, Glenn Murray wrote: > It seems that the best solution would be to provide a self-contained > Cygwin PostgreSQL installation that works independently of a > previously existing installation. The above is not possibly because it violates the one Cygwin DLL per system restriction. > Comments or solutions? Suggestion #1: ============= 1. Package your software as a Cygwin setup.exe installable tarball. 2. Automate the installation steps in the Cygwin PostgreSQL README: http://www.tishler.net/jason/software/postgresql/postgresql-7.2.3.README as a shell script and post it to cygwin@cygwin.com. I will add this script to the Cygwin PostgreSQL distribution as a postinstall script, if done properly. 3. Create a minimal Cygwin mirror plus your package and cygipc using upset to generate a setup.ini file that matches your mirror. Search cygwin-apps@ for info regarding upset. Search the pgsql-cygwin@ archives for the (incomplete) work done to determine the minimum Cygwin packages required by PostgreSQL. 4. Point your Windows users to your mirror and instruct them to use Cygwin's setup.exe to install the software. Suggestion #2: ============= 1. Same as above 2. Same as above 3. Contribute your package to the standard Cygwin distribution. 4. Same as above but point your Windows users to any Cygwin mirror. Suggestion #3: ============= 1. Same as above 2. Same as above 3. Same as above but create a (partial) mirror that only contains your package and cygipc. 4. Same as above but point your Windows users to any Cygwin mirror plus your mirror. Note that Cygwin's setup.exe can install from multiple mirrors simultaneously. Although the above suggestions may be more work than desired, it will guarantee that your software will always coexist nicely with the standard Cygwin distribution. Jason
Jason, Thank you very much for your reply, I am learning a lot already. Keep in mind that my goal is to simplify installation of Cygwin PostreSQL, not to mention cygipc. The difficult part of the install is navigating through the setup.exe dialogs. Your Suggestion #2 reproduces that problem and your Suggestion #3 makes it harder. Only your Suggestion #1 might simplify this by enabling me to tell the user to "Hit the `Next' button until done", so let me ask about that. By "Create a minimal Cygwin mirror" do you mean create a space on a web server and put files (as described in http://cygwin.com/setup.html) that setup.exe can find? I did a search in cygwin-apps for "upset" and found lots of references but not an explanation. I take it that upset helps build a setup.ini file which gets downloaded from the mirror. Where do you get it? I didn't find "upset" as a cygwin package. How does setup.exe see this mirror and not the official Cygwin mirrors, i.e., how do I "point my Windows users" to that particular mirror? Thanks again, Glenn Murray http://www.mines.edu/~gmurray On Tue, 22 Oct 2002, Jason Tishler wrote: > Glenn, > > On Tue, Oct 22, 2002 at 11:14:36AM -0600, Glenn Murray wrote: > > It seems that the best solution would be to provide a self-contained > > Cygwin PostgreSQL installation that works independently of a > > previously existing installation. > > The above is not possibly because it violates the one Cygwin DLL per > system restriction. > > > Comments or solutions? > > Suggestion #1: > ============= > > 1. Package your software as a Cygwin setup.exe installable tarball. > > 2. Automate the installation steps in the Cygwin PostgreSQL README: > > http://www.tishler.net/jason/software/postgresql/postgresql-7.2.3.README > > as a shell script and post it to cygwin@cygwin.com. I will add this > script to the Cygwin PostgreSQL distribution as a postinstall script, if > done properly. > > 3. Create a minimal Cygwin mirror plus your package and cygipc using > upset to generate a setup.ini file that matches your mirror. Search > cygwin-apps@ for info regarding upset. Search the pgsql-cygwin@ > archives for the (incomplete) work done to determine the minimum Cygwin > packages required by PostgreSQL. > > 4. Point your Windows users to your mirror and instruct them to use > Cygwin's setup.exe to install the software. > > Suggestion #2: > ============= > > 1. Same as above > > 2. Same as above > > 3. Contribute your package to the standard Cygwin distribution. > > 4. Same as above but point your Windows users to any Cygwin mirror. > > Suggestion #3: > ============= > > 1. Same as above > > 2. Same as above > > 3. Same as above but create a (partial) mirror that only contains your > package and cygipc. > > 4. Same as above but point your Windows users to any Cygwin mirror plus > your mirror. Note that Cygwin's setup.exe can install from multiple > mirrors simultaneously. > > Although the above suggestions may be more work than desired, it will > guarantee that your software will always coexist nicely with the > standard Cygwin distribution. > > Jason
hi i am on cygwin and i would like to launch a command which execute a request How i can do this? is it possible to keep the track if it is good or not thanks
Florian, On Wed, Oct 23, 2002 at 09:39:00AM +0200, Florian Litot wrote: > i am on cygwin and i would like to launch a command which execute a > request How i can do this? is it possible to keep the track if it is > good or not Please start a new thread when posting a new item -- do *not* reuse an existing thread. Please do *not* cross post unless it is really appropriate. This post does not qualify as such. Actually, your recent posts are really only appropriate on pgsql-general@, pgsql-novice@, or pgsql-sql@. They really are off-topic for cygwin@ and pgsql-cygwin@. Thanks, Jason
Glenn, On Tue, Oct 22, 2002 at 04:46:51PM -0600, Glenn Murray wrote: > Thank you very much for your reply, I am learning a lot already. You are welcome. > Keep in mind that my goal is to simplify installation of Cygwin > PostreSQL, not to mention cygipc. The difficult part of the install > is navigating through the setup.exe dialogs. Your Suggestion #2 > reproduces that problem and your Suggestion #3 makes it harder. Only > your Suggestion #1 might simplify this by enabling me to tell the user > to "Hit the `Next' button until done", so let me ask about that. Agreed. You can solve the above issue, by contributing command line support to Cygwin's setup.exe. Note that the infrastructure required for this support is already implemented. Search cygwin-apps@ for the details. > By "Create a minimal Cygwin mirror" do you mean create a space on a > web server and put files (as described in > http://cygwin.com/setup.html) that setup.exe can find? Yes. > I did a search in cygwin-apps for "upset" and found lots of references > but not an explanation. I take it that upset helps build a setup.ini > file which gets downloaded from the mirror. Yes. > Where do you get it? I didn't find "upset" as a cygwin package. See the following: http://www.cygwin.com/ml/cygwin-apps/2002-07/msg00175.html > How does setup.exe see this mirror and not the official Cygwin > mirrors, i.e., how do I "point my Windows users" to that particular > mirror? Just tell your users to enter your specified "User URL" in the "Choose A Download Site" dialog. Jason
Jason, Thanks again for the reply. I think that command line support in setup.exe is a great idea. I noticed when browsing through the source code that there were comments about it. With command line support many, if not all of the dialogs could be skipped, and it might make it possible to install Cygwin as part of other applications when no/slow internet connections are present. This would be ideal. I'd like to contribute, too, but there are issues: 1. I've never written a line of C/C++ code in my life. I have no notion of pointers, memory allocation, macros or linking. I've never made or applied patches. The most I've done is type "./configure" and "make". I believe I've heard that C++ has something of a nontrivial learning curve---I doubt anyone wants me hacking around their C++ code. 2. Currently "./configure" and "make" do not work with the setup.exe source package. I spent a couple hours last week trying to get the thing to compile without success, thinking I might just try to hack it a bit. Searching the mailing lists indicated that that perhaps I should try with gcc 2.95 and not 3.1, but "mingw" support---whatever that is---is necessary and not available as a Cygwin package for 2.95, or so it seems. I don't think I'm the right guy for the job, at least not without a *lot* of hand-holding. My guess is that a real Cygwin developer would prefer just making the fix instead of trying to shepherd me through the process. That said, I'd be willing to donate some time to trying if anyone is interested in said hand-holding. As a meta-remark regarding your (kind) suggestion that my project be made a Cygwin package. I thought about that. The Cygwin distribution contains mostly general purpose tools, especially those of interest to developers and people interacting with *nix. Our project is written in Java, and of interest to gas-phase chemical process engineers. I don't believe there is a single Java app in Cygwin, is there? Nor do there seem to be large packages for specialized audiences like ours. I'm not sure that Cygwin ever intends to have such packages. On the other hand, if the Cygwin install process could be streamlined, its tools could be used by application developers and piggy-backed on their installations, and a lot more bona fide Cygwin distributions would be installed. (Just musing out loud, here.) Anyway, thanks again, Glenn Murray http://www.mines.edu/~gmurray On Wed, 23 Oct 2002, Jason Tishler wrote: > Glenn, > > On Tue, Oct 22, 2002 at 04:46:51PM -0600, Glenn Murray wrote: > > Thank you very much for your reply, I am learning a lot already. > > You are welcome. > > > Keep in mind that my goal is to simplify installation of Cygwin > > PostreSQL, not to mention cygipc. The difficult part of the install > > is navigating through the setup.exe dialogs. Your Suggestion #2 > > reproduces that problem and your Suggestion #3 makes it harder. Only > > your Suggestion #1 might simplify this by enabling me to tell the user > > to "Hit the `Next' button until done", so let me ask about that. > > Agreed. You can solve the above issue, by contributing command line > support to Cygwin's setup.exe. Note that the infrastructure required > for this support is already implemented. Search cygwin-apps@ for the > details. > > > By "Create a minimal Cygwin mirror" do you mean create a space on a > > web server and put files (as described in > > http://cygwin.com/setup.html) that setup.exe can find? > > Yes. > > > I did a search in cygwin-apps for "upset" and found lots of references > > but not an explanation. I take it that upset helps build a setup.ini > > file which gets downloaded from the mirror. > > Yes. > > > Where do you get it? I didn't find "upset" as a cygwin package. > > See the following: > > http://www.cygwin.com/ml/cygwin-apps/2002-07/msg00175.html > > > How does setup.exe see this mirror and not the official Cygwin > > mirrors, i.e., how do I "point my Windows users" to that particular > > mirror? > > Just tell your users to enter your specified "User URL" in the "Choose A > Download Site" dialog. > > Jason >
Glenn, On Wed, Oct 23, 2002 at 11:04:01AM -0600, Glenn Murray wrote: > Thanks again for the reply. No problem. However, this thread is getting off-topic (and cross-posted) so we should end it very soon or take it off-list, if necessary. > I think that command line support in setup.exe is a great idea. I > noticed when browsing through the source code that there were comments > about it. With command line support many, if not all of the dialogs > could be skipped, and it might make it possible to install Cygwin as > part of other applications when no/slow internet connections are > present. This would be ideal. Agreed. > I'd like to contribute, too, but there are issues: > [snip] > I don't think I'm the right guy for the job, ... > [snip] OK. > I don't believe there is a single Java app in Cygwin, is there? You are correct. Note that I didn't realize that your app was a Java app. If so, then I would not have made the suggestion to contribute it. > Nor do there seem to be large packages for specialized audiences like > ours. I'm not sure that Cygwin ever intends to have such packages. Actually, there some specialized ones but maybe not quite as specialized as yours. :,) > On the other hand, if the Cygwin install process could be streamlined, > its tools could be used by application developers and piggy-backed on > their installations, Agreed, but... > and a lot more bona fide Cygwin distributions would be installed. > (Just musing out loud, here.) Actually, there are many Cygwin installations already. Jason
Neelakantan, I presume that you meant to post instead of sending private email. Anyway, please start a new thread when starting a new topic. Thanks, Jason On Thu, Oct 24, 2002 at 05:55:27PM +0530, Neelakantan Gugesh wrote: > Dear Group, > > Help me out from this situation > > when we execute > > nmake /f win32.mak > > we are getting a follwoing error > > cd include > if not exist pg_config.h copy pg_config.h.win32 pg_config.h > cd .. > cd interfaces\libpq > nmake /f win32.mak > Building the Win32 static library... > > No configuration specified. Defaulting to Release. > > cd ..\libpq++ > nmake /f win32.mak > cd ..\..\bin\psql > nmake /f win32.mak > cd ..\.. > echo All Win32 parts have been built! > All Win32 parts have been built! > > After Directory mapping and > > on executing the Psql > > we are getting the follwing error > > psql:could not create socket An address incompatible > with the requested protocol was used > (0X0000273f)
Jason, I see now that a lot of people on the list agree that command line options for setup.exe is a Good Idea and I'll let it go at that, in hopes that some C++ wizard picks it up. In the meantime I'll muddle through with scripts, lengthy explanations, and hand-holding. Thanks for your responses. Cheers, Glenn Murray http://www.mines.edu/~gmurray On Thu, 24 Oct 2002, Jason Tishler wrote: > Glenn, > > On Wed, Oct 23, 2002 at 11:04:01AM -0600, Glenn Murray wrote: > > Thanks again for the reply. > > No problem. However, this thread is getting off-topic (and > cross-posted) so we should end it very soon or take it off-list, if > necessary. > > > I think that command line support in setup.exe is a great idea. I > > noticed when browsing through the source code that there were comments > > about it. With command line support many, if not all of the dialogs > > could be skipped, and it might make it possible to install Cygwin as > > part of other applications when no/slow internet connections are > > present. This would be ideal. > > Agreed. > > > I'd like to contribute, too, but there are issues: > > [snip] > > I don't think I'm the right guy for the job, ... > > [snip] > > OK. > > > I don't believe there is a single Java app in Cygwin, is there? > > You are correct. Note that I didn't realize that your app was a Java > app. If so, then I would not have made the suggestion to contribute it. > > > Nor do there seem to be large packages for specialized audiences like > > ours. I'm not sure that Cygwin ever intends to have such packages. > > Actually, there some specialized ones but maybe not quite as specialized > as yours. :,) > > > On the other hand, if the Cygwin install process could be streamlined, > > its tools could be used by application developers and piggy-backed on > > their installations, > > Agreed, but... > > > and a lot more bona fide Cygwin distributions would be installed. > > (Just musing out loud, here.) > > Actually, there are many Cygwin installations already. > > Jason >