From 23fd5ef82afefa0732df9f4f386888ccffad8b1a Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 5 Sep 2018 16:29:22 -0400 Subject: [PATCH] LP#1790923: disable XUL staff client by default This patch discourages use of the legacy XUL staff client by adjusting the installation process so that a versioned XUL server directory is not created. Instead, by default XUL server files (which is still needed by a few web staff client interfaces) end up in /openils/var/web/xul/legacy. During installation and upgrade, the /openils/var/web/xul/server symbolic link is set to point to /openils/var/web/xul/legacy/server if possible. If for some reason a given installation of Evergreen 3.2.x does not wish to stop using the XUL staff client, STAFF_CLIENT_STAMP_ID can still be provided during the 'make install' step, and the make_release script can still create the XUL client installers if given the -x switch. Note, however, that use of the XUL staff client in 3.2.x is NOT RECOMMENDED and no longer under any guarantee of community support. To test ------- [1] Perform a fresh installation and verify that /openils/var/web/xul/legacy is created and that /openils/var/web/xul/server is a symlink pointing to /openils/var/web/xul/legacy/server. [2] Verify that the web staff client works and that the user permissions editor in particular continues to work. [3] Perform an upgrade; verify that /openils/var/web/xul/legacy exists and that if /openils/var/web/xul/server started out as a symlink, it has been repointed. Signed-off-by: Galen Charlton Signed-off-by: Bill Erickson --- Open-ILS/xul/staff_client/Makefile.am | 22 +++++++++++++++++++++- docs/installation/server_installation.adoc | 16 +--------------- docs/installation/server_upgrade.adoc | 14 +++++++++++++- 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/Open-ILS/xul/staff_client/Makefile.am b/Open-ILS/xul/staff_client/Makefile.am index 0da672fcf6..7834a013b8 100644 --- a/Open-ILS/xul/staff_client/Makefile.am +++ b/Open-ILS/xul/staff_client/Makefile.am @@ -5,7 +5,7 @@ export WEBDIR=@localstatedir@/web export STAFF_CLIENT_BUILD_ID = $$(/bin/cat build/BUILD_ID) export STAFF_CLIENT_VERSION = $$(/bin/cat build/VERSION) -export STAFF_CLIENT_STAMP_ID = $$(/bin/cat build/STAMP_ID) +export STAFF_CLIENT_STAMP_ID = legacy # from http://closure-compiler.googlecode.com/files/compiler-latest.zip FIXME: Autotools this? export CLOSURE_COMPILER_JAR = ~/closure-compiler/compiler.jar @@ -201,6 +201,26 @@ server-xul: needwebdir build @echo "Copying xul into $(DESTDIR)$(WEBDIR)/xul/$(STAFF_CLIENT_STAMP_ID)" mkdir -p "$(DESTDIR)$(WEBDIR)/xul/$(STAFF_CLIENT_STAMP_ID)" cp -R @top_srcdir@/Open-ILS/xul/staff_client/build/server "$(DESTDIR)${WEBDIR}/xul/${STAFF_CLIENT_STAMP_ID}/" + @if [ "${STAFF_CLIENT_STAMP_ID}" == "legacy" ]; then \ + echo "Installing the legacy parts of the XUL staff client"; \ + if [ -L "$(DESTDIR)${WEBDIR}/xul/server" ]; then \ + echo "Updating XUL server symlink to point to legacy code"; \ + rm $(DESTDIR)${WEBDIR}/xul/server; \ + ( cd "$(DESTDIR)${WEBDIR}/xul"; ln -s legacy/server server; ); \ + else \ + if [ ! -f "$(DESTDIR)${WEBDIR}/xul/server" ]; then \ + echo "Creating XUL server symlink to point to legacy code"; \ + ( cd "$(DESTDIR)${WEBDIR}/xul"; ln -s legacy/server server; ); \ + else \ + if [ -d "$(DESTDIR)${WEBDIR}/xul/server" ]; then \ + echo "WARNING: $(DESTDIR)${WEBDIR}/xul/server is a directory; "; \ + echo "Not overwriting it, but you should probably do the following: "; \ + echo "1. Remove or move it, and "; \ + echo "2. Create a symlink from $(DESTDIR)${WEBDIR}/xul/legacy/server to $(DESTDIR)${WEBDIR}/xul/server "; \ + fi; \ + fi; \ + fi; \ + fi; # manage the server symlink if installing the 'legacy' staff client compress-javascript: build @echo "Size of build/ before compression = " `du -sh build/` diff --git a/docs/installation/server_installation.adoc b/docs/installation/server_installation.adoc index c057e594fa..9c7eedd104 100644 --- a/docs/installation/server_installation.adoc +++ b/docs/installation/server_installation.adoc @@ -248,24 +248,10 @@ Installation instructions command as the *root* Linux account to install Evergreen, build the server portion of the staff client, and copy example configuration files to `/openils/conf`. - Change the value of the `STAFF_CLIENT_STAMP_ID` variable to match the version - of the staff client that you will use to connect to the Evergreen server. + [source, bash] ------------------------------------------------------------------------------ -make STAFF_CLIENT_STAMP_ID=rel_name install ------------------------------------------------------------------------------- -+ -2. The server portion of the staff client expects `http://hostname/xul/server` - to resolve. Issue the following commands as the *root* Linux account to - create a symbolic link pointing to the `server` subdirectory of the server - portion of the staff client that we just built using the staff client ID - 'rel_name': -+ -[source, bash] ------------------------------------------------------------------------------- -cd /openils/var/web/xul -ln -sf rel_name/server server +make install ------------------------------------------------------------------------------ Change ownership of the Evergreen files diff --git a/docs/installation/server_upgrade.adoc b/docs/installation/server_upgrade.adoc index 3f1c7eabcc..c7c1bf0ea2 100644 --- a/docs/installation/server_upgrade.adoc +++ b/docs/installation/server_upgrade.adoc @@ -94,6 +94,17 @@ These instructions assume that you have also installed OpenSRF under /openils/. [source, bash] ------------------------------------------------------------ cd /home/opensrf/Evergreen-ILS-2.12.0 +make install +------------------------------------------------------------ ++ + +**Note** that this version of Evergreen does not use the legacy XUL staff +client by default, but if you wish to use a versioned XUL staff client, you +can supply `STAFF_CLIENT_STAMP` during the `make install` step like this: ++ +[source, bash] +------------------------------------------------------------ +cd /home/opensrf/Evergreen-ILS-2.12.0 make STAFF_CLIENT_STAMP_ID=rel_2_12_rc install ------------------------------------------------------------ + @@ -104,7 +115,8 @@ make STAFF_CLIENT_STAMP_ID=rel_2_12_rc install chown -R opensrf:opensrf /openils ------------------------------------------------------------ + -. As the *opensrf* user, update the server symlink in /openils/var/web/xul/: +. (Optional, only if you are using the legacy staff client) + As the *opensrf* user, update the server symlink in /openils/var/web/xul/: + [source, bash] ----------------------------------------------------------- -- 2.43.2