Opened 13 years ago
Last modified 12 years ago
#746 new defect
Merging llssite glisite. Reorganising toplevel scripts and references to them
Reported by: | ak19 | Owned by: | nobody |
---|---|---|---|
Priority: | moderate | Milestone: | Possible 2.88 Release |
Component: | Greenstone2&3 | Severity: | minor |
Keywords: | Cc: |
Description
(1) After a GS2's installation location is moved manually by a user, a few things need to be done to make sure Greenstone can run again thereafter:
In gsi-control.sh and gsi-control.bat, need a new, separate target called something like "reset-gsdlhome". This target first *forces* configure-cgi (so that gsdlsite.cfg is indeed deleted and replaced with gsdlsite.cfg.in). This part of the target needs to warn the user that "local changes made to gsdlsite.cfg will be lost". Second, the "reset-gsdlhome" should call configure-apache to make sure apache is updated with the new GSDLHOME. Finally, need *.app.in template files for Mac and need to add code into configure-apache or somewhere to change all the *.app.in references to GSDLHOME into the correct GSDLHOME when generating *.app from that template file.
(2) GSI-Makefile is not used, it just makes calls to gsi-control.bat. It can simply go. Maybe leave a note in the release_notes that it has been deprecated, telling people to use gsi-control instead.
(3) Too many scripts at top level (.bat, .sh, .app). They're to be put into a folder called Applications (or Launch), and references to them need to be updated. E.g. server.jar refers to gs2-server and gs3-server.
Change History (9)
comment:1 by , 13 years ago
Severity: | major → minor |
---|
comment:2 by , 13 years ago
comment:3 by , 13 years ago
step 1 of the above was done and committed. Revisions:
gsicontrol.sh: 23945, 23963, 23966, 23973, 23975, 23982, 23988
gsicontrol.bat: 23945, 23963, 23964, 23966, 23974, 23987, 23406
comment:4 by , 13 years ago
Step 2 also done: GSI-Makefile removed, since gsicontrol.bat/sh does everything anyway.
comment:5 by , 13 years ago
Milestone: | 2.85 Release → 2.86 Release |
---|
comment:6 by , 13 years ago
Step 4 is now also finished. It's the unnumbered task: "llssite.cfg and glisite.cfg can be merged into one file called serversite.cfg, by having lls.autoenter, lls.start_browser, gli.autoenter, gli.start_browser properties all in one file". Though this part of the ticket has been completed sucessfully (after John Rose requested it recently), it's been implemented slightly differently from the task description:
Server2.jar takes an extra optional parameter now: --mode=gli. This is passed into Server2.jar when GLI launches it (via gs2-webserver.bat, which now passes all parameters straight through to Server2.jar).
Changes needed to be made to the following sections of code:
- GS3's code for Server2.jar, GS2's copy of server.jar and server.properties files:
- runtime\src\w32server:
- GLI's LocalLibraryServer.java (the most complicated one):
- the config files glisitecfg.in and llssite.cfg.in: ultimately, glisite.cfg.in was removed from the repository with commit 24506.
The revision numbers for the commits:
a) Better way for Server2 to keep the selected port by default (this is a fix to some undesirable behaviour by GSI and has nothing to do with merging the server site config files): 24455, 24457
b) Relevant commits:
- 24465, 24466
- 24479-24482, 24490
- 24491-24494
- 24498, 24499
- 24503-24507
The most crucial commit is to GLI's LocalLibraryServer.java in r24505, as this contains the most complex changes which were all done in one step and tested before committing. If there is any problem with GLI's interaction with the GSI, revert this java file to before 24505, and restore glisite.cfg.in (which was removed in r24506). It's not likely there could be any problems as I have now tested extensively and successfully on Windows with both server.exe and the apache webserver, and tested on Linux. In all 3 cases, the tests included launching the GSI via GLI and independent of it. As well as closing GSI in the middle and restarting it again with GLI's Preview button.
comment:7 by , 13 years ago
Part of the above posting:
- Forgot to mention that another part of the affected code was gs2-webserver.bat to deal with the new --mode=gli parameter. The Linux script gs2-server.sh was not affected, since only the Windows batch script needed to deal in a special manner with double nested quotes around commands containing filepaths with spaces in them. Now gs2-webserver.bat no longer processes any of the parameters itself, but passes them straight onto Server2.jar, the code for which was updated to parse and reconstitute parameters correctly from the arguments given to it.
- An additional commit, r24508, removed all comments referring to glisite.cfg(.in), or changed them to refer to just llssite.cfg as necessary.
comment:8 by , 12 years ago
Summary: | Reorganising toplevel scripts and references to them → Merge llssite glisite. Reorganising toplevel scripts and references to them |
---|
15 Dec 2011
Another change to do with merging llssite.cfg and glissite.cfg:
http://trac.greenstone.org/changeset/24906
Change to: gli/src/org/greenstone/gatherer/greenstone/LocalLibraryServer.java
The original GLI LocalLibraryServer.java code called restore() when stopping the LLS. This would delete the configfile if it was not null. This code remained the same throughout the old changes from gsdlsite.cfg to glisite.cfg. However, the more recent change was to merge glisite.cfg with llssite.cfg, and we don't want to delete the file containing the property values. The file now retains the values that I think are important to remember, removes the URL that must be deleted when the server is stopped, additionally removes some values particular to server.exe and finally ensures that some basic defaults are retained if anything goes missing.
comment:9 by , 12 years ago
Summary: | Merge llssite glisite. Reorganising toplevel scripts and references to them → Merging llssite glisite. Reorganising toplevel scripts and references to them |
---|
llssite.cfg and glisite.cfg can be merged into one file called serversite.cfg, by having lls.autoenter, lls.start_browser, gli.autoenter, gli.start_browser properties all in one file.