Apache Tomcat / Tomcat based apps
Hello, A few weeks back I posted a message asking for some direction on contributing to Cygwin by maintaining Apache Tomcat and a few other tomcat based applications. A few people responded and suggested that I look at gcj as the possible compiler to use as it is already in Cygwin. I have spent the last few weeks trying to get this to work with no success. I would like to find out if it is possible to create a dependency in a package on the sun java sdk. For example the default install of Java 1.5 from Sun uses a home directory of: /cygdrive/c/Program\ Files/Java/jdk1.5.0_06 , so keying on the presence of that directory is a good bet Java is installed with the correct version. Suggestions? Comments? Thanks, -Chris
Re: Apache Tomcat / Tomcat based apps
Christopher Molnar wrote: /cygdrive/c/Program\ Files/Java/jdk1.5.0_06 , so keying on the presence of that directory is a good bet Java is installed with the correct version. No, that's not a good bet at all. That directory is only spelled Program Files in the English localization. In other versions of windows it defaults to \Archivos de programa, \Programme, and so on. It could be on any drive letter. Or the user might have chosen something else entirely like z:\foobar. And not everyone has their cygdrive prefix set to /cygdrive either. You can't make any such kind of assumption about paths whatsoever. Brian
Re: Apache Tomcat / Tomcat based apps
OK, understand. Now I need to ask the question.. Do you have any ideas how I can make this work? Maybe a package that the user selects if java is on the machine? Again, I am trying to deal with the problem and not having much luck. Thanks, -Chris Brian Dessent wrote: Christopher Molnar wrote: /cygdrive/c/Program\ Files/Java/jdk1.5.0_06 , so keying on the presence of that directory is a good bet Java is installed with the correct version. No, that's not a good bet at all. That directory is only spelled Program Files in the English localization. In other versions of windows it defaults to \Archivos de programa, \Programme, and so on. It could be on any drive letter. Or the user might have chosen something else entirely like z:\foobar. And not everyone has their cygdrive prefix set to /cygdrive either. You can't make any such kind of assumption about paths whatsoever.
Re: Apache Tomcat / Tomcat based apps
On Sun, 21 May 2006, Christopher Molnar wrote: Hello, A few weeks back I posted a message asking for some direction on contributing to Cygwin by maintaining Apache Tomcat and a few other tomcat based applications. A few people responded and suggested that I look at gcj as the possible compiler to use as it is already in Cygwin. I have spent the last few weeks trying to get this to work with no success. I would like to find out if it is possible to create a dependency in a package on the sun java sdk. For example the default install of Java 1.5 from Sun uses a home directory of: /cygdrive/c/Program\ Files/Java/jdk1.5.0_06 , so keying on the presence of that directory is a good bet Java is installed with the correct version. Suggestions? Comments? You can have a configuration script that contains a path to the Java SDK, which the users can edit, and install it from a default location if not present. As long as the only thing in that script is the Java SDK location, you should never have to replace it on installation. Sure, the package won't work OOTB, but configuration is as easy as putting one path in, say, /etc/tomcat.java.cfg (invent the name, there isn't a standard one). This also might be a good time to plug my java wrapper scripts in the cygwin-apps repository. They started out exactly along the lines of what you've been thinking (i.e., a hard-coded user-editable path), but my latest improvement that I've just committed uses the $JAVA_HOME setting to detect the installation. This works with both IBM and Sun JDKs (1.4.2 and 1.5.0 are the ones I've tested). I usually make symlinks in /usr/local/bin to the scripts in the local CVS copy. Check them out: http://cygwin.com/cgi-bin/cvsweb.cgi/wrappers/java/?cvsroot=cygwin-apps. I do intend to package them as a Cygwin package at some point soon. Comments and suggestions welcome. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte. But no -- you are no fool; you call yourself a fool, there's proof enough in that! -- Rostand, Cyrano de Bergerac
Proposal for associating file extensions with cygwin programs
As I stated here: http://cygwin.com/ml/cygwin/2006-02/msg00591.html In response to a few requests (two that I am aware of): http://cygwin.com/ml/cygwin/2006-02/msg00533.html http://cygwin.com/ml/cygwin/2005-11/msg00738.html and my original proposal: http://cygwin.com/ml/cygwin-apps/2005-11/msg00274.html I've done a little work on a script and small application allowing users to set up some explorer integration for cygwin applications, using script fragments that would be installed with the packages (and maintained by the application package maintainers). I'm looking for feedback on what I've done so far. Eventually I'll either ITP this as a new package, or merge the functionality with chere. (Or if no interest, just drop it entirely). Everything works for me as it stands (W2K Prof). Details below for those who are interested. Dave. Source and examples available at: http://www.virtualsoup.org/files/sentry-0.1-1.tar.bz2 * Instructions 1. Extract somewhere 2. Run configure and make (package isn't autoconfed, but should behave well enough). Note the standard cygwin make 3.80 won't succeed. It needs 3.81 or the patch at http://savannah.gnu.org/bugs/?func=detailitemitem_id=1517 3. Do make install, or just place sentry.exe in your path. 4. Play with the xpintegrate script (in whereever you extracted things to) * Details The xpintegrate script is like the chere script. It is modular and does not contain the specific code for shell/terminal stuff. It is intended to setup handlers for particular file extensions as defined by shell fragments (in the examples directory). Use the -h option to get help. Before having the script do anything (-i/-u), please use the -p option and check what it will do to the registry. Starting cygwin programs requires that any file arguments are POSIX style, and that the environment is setup as from a login shell. This could be done by starting a login shell for each program and running a script to convert the filenames. After investigating it seems more efficient to have a common login shell spawn subsequent programs. sentry.exe is a mingw tray icon application. Upon startup it starts a login shell (default ash) with stdin, stdout and stderr redirected to pipes controlled by sentry.exe. Each subsequent instance of sentry.exe passes its command line arguments to the original instance and exits. The original instance parses the command line arguments and executes them in the login shell. It optionally passes certain arguments through cygpath. When started right-clicking the cygwin icon and selecting Console will let you see the commands being executed, and any command output (or errors). ** Known issues - if bash is used as the login shell a command isn't executed until another command is received. http://cygwin.com/ml/cygwin/2006-04/msg00980.html * Shell fragments The shell fragments which define how to setup things for a given application have the extension .xpi. I've included whatever I thought might be useful, but only a some of the information is used at the moment to setup the context menus. Suggestions on other infomation to put there welcome. ** Examples I've put together examples to associate .txt files with notepad, .exe files with insight, and Drives/Directories with a login and non-login rxvt/bash. The bash examples are merely to show that it can be done, and to highlight any differences in environment. I'm not sure whether we should use this mechanism to subsume chere functionality. It's messy enough as it is. I don't use the xserver, but it should be simple enough to set up .xpi files for any X program. WARNING: Avoid associating an app with .exe. I did this with my first attempt for insight. It breaks Start...run (and who knows what else). Associate with exefile instead. I need to verify that using exefile works on all windows versions though. * TODO - Decide where to put .xpi files - Add ability to copy text from console dialog - Read login shell to use settings from /etc/passwd by default - Add a properties dialog to allow the user to specify that sentry use a particular login shell. - ... other options??? * License The code is GPL'ed.
Re: [ITP] gmp-4.2 and mpfr-2.2
Billinghurst, David (CALCRTS) wrote: I have packaged gmp-4.2 and mpfr-2.2.0. The current gmp maintainer Lapo Luchini is happy for me to offer these for review and take over as maintainer if they are acceptable. Thanks for doing this. The new cygmpfr1.dll is not binary compatible with the current cygmpfr0.dll. How should this be managed? Should I provide a libmpfr0 package that just contains the existing cygmpfr0.dll? Yes. What I would suggest is the following: Get the current gmp-4.1.4-2 binary package. Unpack usr/bin/cygmpfr-0.dll from it. Package that file into libmpfr0-4.1.4-3.tar.bz2 Get the currrent gmp-4.1.4-2-src source package Rename it libmpfr0-4.1.4-3-src. And there you have it. Sure, downloading and unpacking libmpfr0-4.1.4-3-src and following its build instructions won't get you the exact package libmpfr0-4.1.4-3.tar.bz2 -- but it WILL get you the exact cygmpfr-0.dll -- and that's all that's truly necessary in this case. Anyway, that's the procedure I use whenever I bump a DLL number but have to keep the old dll in the distribution (and guarantee that the source used to create THAT dll is also kept in the distribution, maintaining GPL happiness). -- Chuck
Re: Apache Tomcat / Tomcat based apps
On Sun, 21 May 2006, Christopher Molnar wrote: I would like to find out if it is possible to create a dependency in a package on the sun java sdk. For example the default install of Java 1.5 from Sun uses a home directory of: /cygdrive/c/Program\ Files/Java/jdk1.5.0_06 , so keying on the presence of that directory is a good bet Java is installed with the correct version. On 5/21/06, Igor Peshansky wrote: You can have a configuration script that contains a path to the Java SDK, which the users can edit, and install it from a default location if not present. As long as the only thing in that script is the Java SDK location, you should never have to replace it on installation. Sure, the package won't work OOTB, but configuration is as easy as putting one path in, say, /etc/tomcat.java.cfg (invent the name, there isn't a standard one). I haven't been using Java on Cygwin, but I follow it fairly closely on Red Hat Enterprise and Fedora mailing lists. The emerging standard way of doing things there is with the JPackage.org layout, which heavily uses the alternatives system to set up useful JAVA_HOME variables and /usr/bin/java{,c} and if desired to easily switch between several JVMs (Sun, IBM, even GJC or Kaffe). There are some helper scripts in a jpackage-utils package; the original from JPackage.org uses RPMs, but Debian and Ubuntu have adopted the overall framework with DEBs so my guess would be that making Cygwin packages with the same methods would work too. They have a lot of Java apps packaged in a FHS-compliant way, including Eclipse and Tomcat (and the config file if you want to change for example JAVA_OPTS for Tomcat5 is /etc/tomcat5/tomcat5.conf ). From what I remember of Igor's scripts, they basically act like this java-compat RPM: http://jpackage.org/rpm.php?id=3319 which creates symlinks to a preexisting JVM install. (BTW: they know their website is ugly.) See also the Ubuntu package: http://packages.ubuntulinux.org/dapper/utils/jpackage-utils Or, maybe that's all too complicated. :)
Re: Apache Tomcat / Tomcat based apps
So if I follow your java.sh script correctly and get the idea, I could call this at the start of the startup.sh script which needs the location of JAVA_HOME and it would find the correct jdk location? or does it just find the java.exe? I would need it to find JAVA_HOME and set that variable If I am thinking this through correctly. I also need this for the build scripts for ANT and TOMCAT. -Chris Igor Peshansky wrote: My wrapper scripts do a bit more than that -- they also translate the arguments containing paths appropriately, before eventually invoking the right executables. The part that dispatches based on JAVA_HOME is not the main point of the scripts, though it's nice to have. Igor
Re: Apache Tomcat / Tomcat based apps
Ugh, top-posting... Reformatted. On Sun, 21 May 2006, Christopher Molnar wrote: Igor Peshansky wrote: My wrapper scripts do a bit more than that -- they also translate the arguments containing paths appropriately, before eventually invoking the right executables. The part that dispatches based on JAVA_HOME is not the main point of the scripts, though it's nice to have. Igor So if I follow your java.sh script correctly and get the idea, I could call this at the start of the startup.sh script which needs the location of JAVA_HOME and it would find the correct jdk location? or does it just find the java.exe? Well, JAVA_HOME is expected to already point to the correct JDK location. And you would simply invoke the appropriate wrapper for each program (e.g., invoke java to find java.exe, jar to find jar.exe, etc). The wrappers will help those JDK programs understand Cygwin paths, etc. Their intent was to help non-Cygwin-aware Unix scripts that invoke java and other JDK executables. I would need it to find JAVA_HOME and set that variable If I am thinking this through correctly. One of the future work items in the wrappers is the logic (which would most likely go into a /etc/profile.d script) to find some Java installation automatically and set JAVA_HOME if it's not already set. But this is obviously not done yet. I also need this for the build scripts for ANT and TOMCAT. I'm not very familiar with the Tomcat build procedure, but, IIRC, my wrappers will not be very helpful for Ant, as its build scripts understand the JAVA_HOME setting, are Cygwin-aware, and do the appropriate path conversion themselves (so the wrappers never get invoked -- Ant invokes java.exe directly). Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte. But no -- you are no fool; you call yourself a fool, there's proof enough in that! -- Rostand, Cyrano de Bergerac