From 856da80d4748f7155a49935231b3ecaeaefb848e Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Thu, 15 Oct 2020 09:24:28 -0400 Subject: [PATCH] Lp 1899974: Export PERL5LIB in oils_ctl.sh A change in Perl release 5.26.0 necessitates that the SIP_DIR variable (default value "/opt/SIPServer") be exported to the environment in oils_ctl.sh when attempting to start SIPServer. This change affects Ubuntu 18.04 (Bionic Beaver) and Debian 10 (Buster) and any future releases. To verify the bug: 1. Install OpenSRF, Evergreen, and SIPServer on an affected O/S. 2. Start OpenSRF service. 3. Start SIPServer via oils_ctl.sh: oils_ctl.sh -a start_sip 4. Notice the "Starting OILS SIP Server" message is printed with no indication of failure. 5. Verify that the PID file exists: /openils/var/run/oils_sip.pid 6. Verify that no SIPServer processes are actually running: pgrep -af SIPServer The above should produce no output. To test this patch: 1. Apply this patch and install oils_ctl.sh to /openils/bin/. 2. Assuming you have run the previous steps, delete the PID file: rm /openils/var/run/oils_sip.pid 3. Start SIPServer via oils_ctl.sh: oils_ctl.sh -a start_sip 4. Notice the "Starting OILS SIP Server" message is printed. 5. Verify that the PID file exists: /openils/var/run/oils_sip.pid 6. `pgrep -af SIPServer` should produce output. It is safe to apply this patch on an unaffected O/S. Explicitly adding SIP_DIR to PERL5LIB will have no detrimental effect on any O/S currently supported by Evergreen. Signed-off-by: Jason Stephenson Signed-off-by: Jason Boyer --- Open-ILS/examples/oils_ctl.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Open-ILS/examples/oils_ctl.sh b/Open-ILS/examples/oils_ctl.sh index dde70cb1fc..01e297bf20 100755 --- a/Open-ILS/examples/oils_ctl.sh +++ b/Open-ILS/examples/oils_ctl.sh @@ -8,6 +8,13 @@ OPT_Z3950_CONFIG="SYSCONFDIR/oils_z3950.xml" OPT_YAZ_CONFIG="SYSCONFDIR/oils_yaz.xml" Z3950_LOG="LOCALSTATEDIR/log/oils_z3950.log" SIP_DIR="/opt/SIPServer"; +if [ -z "${PERL5LIB}" ]; then + export PERL5LIB="${SIP_DIR}" +else + if ! grep -q "${SIP_DIR}" <<< "${PERL5LIB}"; then + PERL5LIB="${PERL5LIB}:${SIP_DIR}" + fi +fi # --------------------------------------------------------------------------- # Make sure we're running as the correct user -- 2.43.2