[open-ils-commits] [GIT] Evergreen ILS branch master updated. a0b3aaf19ec133f5ddb85e09e1d5abde69cf96c5

Evergreen Git git at git.evergreen-ils.org
Tue Aug 23 14:59:49 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  a0b3aaf19ec133f5ddb85e09e1d5abde69cf96c5 (commit)
       via  9628a2a9bfdc1157e5f0d92987cf95ab60683426 (commit)
       via  e02abf123f317cc97c15ef52b27a8d2b9847f23a (commit)
      from  2bd6d0bd6763815e3a051ee20ac4bd463ad5aad5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a0b3aaf19ec133f5ddb85e09e1d5abde69cf96c5
Author: Jason Stephenson <jstephenson at mvlc.org>
Date:   Thu Jun 23 10:19:50 2011 -0400

    Really stop the z39.50 daemon when a client is connected.
    
    Send a SIGTERM instead of SIGINT from do_action when the action is
    stop in oils_ctl.sh.
    
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/examples/oils_ctl.sh b/Open-ILS/examples/oils_ctl.sh
index d47ba6f..5363db7 100755
--- a/Open-ILS/examples/oils_ctl.sh
+++ b/Open-ILS/examples/oils_ctl.sh
@@ -83,7 +83,7 @@ function do_action {
 
 		pid=$(cat $pidfile);
 		echo "Stopping $item : $pid";
-		kill -s INT $pid;
+		kill -s TERM $pid;
 		rm -f $pidfile;
 
 	fi;

commit 9628a2a9bfdc1157e5f0d92987cf95ab60683426
Author: Dan Scott <dan at coffeecode.net>
Date:   Wed Jun 22 22:55:27 2011 -0400

    Enhance sample Z39.50 config file
    
    Make "expose holdings" the default; use specific indexes for ISBN and
    ISSN; show how to scope results to a part of the org tree; and show that
    multiple database configs can be specified in the same file.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/examples/oils_z3950.xml.example b/Open-ILS/examples/oils_z3950.xml.example
index 6fe8777..6cacbca 100644
--- a/Open-ILS/examples/oils_z3950.xml.example
+++ b/Open-ILS/examples/oils_z3950.xml.example
@@ -1,14 +1,31 @@
 <client>
-   <database name="OILS">
+   <database name="CONS">
      <!-- Change "localhost" to your server's name as appropriate. -->
-     <zurl>http://localhost/opac/extras/sru</zurl>
+     <zurl>http://localhost/opac/extras/sru/-/holdings</zurl>
      <option name="sru">get</option>
      <charset>marc-8</charset>
      <search>
        <querytype>cql</querytype>
        <map use="4"><index>eg.title</index></map>
-       <map use="7"><index>eg.keyword</index></map>
-       <map use="8"><index>eg.keyword</index></map>
+       <map use="7"><index>eg.isbn</index></map>
+       <map use="8"><index>eg.issn</index></map>
+       <map use="21"><index>eg.subject</index></map>
+       <map use="1003"><index>eg.author</index></map>
+       <map use="1018"><index>eg.publisher</index></map>
+       <map use="1035"><index>eg.keyword</index></map>
+       <map use="1016"><index>eg.keyword</index></map>
+     </search>
+   </database>
+   <database name="BR1">
+     <!-- Change "localhost" to your server's name as appropriate. -->
+     <zurl>http://localhost/opac/extras/sru/BR1/holdings</zurl>
+     <option name="sru">get</option>
+     <charset>marc-8</charset>
+     <search>
+       <querytype>cql</querytype>
+       <map use="4"><index>eg.title</index></map>
+       <map use="7"><index>eg.isbn</index></map>
+       <map use="8"><index>eg.issn</index></map>
        <map use="21"><index>eg.subject</index></map>
        <map use="1003"><index>eg.author</index></map>
        <map use="1018"><index>eg.publisher</index></map>

commit e02abf123f317cc97c15ef52b27a8d2b9847f23a
Author: Jason Stephenson <jstephenson at mvlc.org>
Date:   Fri Jun 10 13:43:32 2011 -0400

    Make some oils_ctl.sh improvements.
    
    Add start|stop|restart commands for z39.50 to oils_ctl.sh.
    
    Use LOCALSTATEDIR and SYSCONFDIR configuration variables in
    oils_ctl.sh.
    
    Modify the existing SIP2 commands in oils_ctl.sh to use these
    configuration variables.
    
    Modify src/Makefile.am to replace LOCALSTATEDIR and SYSCONFDIR
    variables in oils_ctl.sh when installing.
    
    Add example/default xml configurations for z39.50:
    Open-ILS/examples/oils_yaz.xml.example
    Open-ILS/examples/oils_z3950.xml.example
    
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
    Signed-off-by: Dan Scott <dan at coffeecode.net>

diff --git a/Open-ILS/examples/oils_ctl.sh b/Open-ILS/examples/oils_ctl.sh
index c88dc67..d47ba6f 100755
--- a/Open-ILS/examples/oils_ctl.sh
+++ b/Open-ILS/examples/oils_ctl.sh
@@ -1,9 +1,12 @@
 #!/bin/bash
 
 OPT_ACTION=""
-OPT_SIP_CONFIG=""
-OPT_PID_DIR=""
+OPT_SIP_CONFIG="SYSCONFDIR/oils_sip.xml"
+OPT_PID_DIR="LOCALSTATEDIR/run"
 OPT_SIP_ERR_LOG="/dev/null";
+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";
 
 # ---------------------------------------------------------------------------
@@ -14,12 +17,18 @@ SIP_DIR="/opt/SIPServer";
 
 function usage {
 	echo "";
-	echo "usage: $0 -d <pid_dir> -s <sip_config> -a <action> -l <sip_err_log>";
+	echo "usage: $0 -d <pid_dir> -s <sip_config> -z <z3950_config> -y <yaz_config> -a <action> -l <sip_err_log>";
 	echo "";
 	echo "Actions include:"
 	echo -e "\tstart_sip"
 	echo -e "\tstop_sip"
 	echo -e "\trestart_sip"
+	echo -e "\tstart_z3950"
+	echo -e "\tstop_z3950"
+	echo -e "\trestart_z3950"
+	echo -e "\tstart_all"
+	echo -e "\tstop_all"
+	echo -e "\trestart_all"
 	exit;
 }
 
@@ -33,6 +42,8 @@ while getopts "a:d:s:l:" flag; do
 		"s")		OPT_SIP_CONFIG="$OPTARG";;
 		"d")		OPT_PID_DIR="$OPTARG";;
 		"l")		OPT_SIP_ERR_LOG="$OPTARG";;
+		"z")		OPT_Z3950_CONFIG="$OPTARG";;
+		"y")		OPT_YAZ_CONFIG="$OPTARG";;
 		"h"|*)	usage;;
 	esac;
 done
@@ -42,7 +53,7 @@ done
 [ -z "$OPT_ACTION" ] && usage;
 
 PID_SIP="$OPT_PID_DIR/oils_sip.pid";
-
+PID_Z3950="$OPT_PID_DIR/oils_z3950.pid";
 
 # ---------------------------------------------------------------------------
 # Utility code for checking the PID files
@@ -90,7 +101,7 @@ function start_sip {
 	do_action "start" $PID_SIP "OILS SIP Server";
 	DIR=$(pwd);
 	cd $SIP_DIR;
-    perl SIPServer.pm "$OPT_SIP_CONFIG" >> "$OPT_SIP_ERR_LOG" 2>&1 &
+	perl SIPServer.pm "$OPT_SIP_CONFIG" >> "$OPT_SIP_ERR_LOG" 2>&1 &
 	pid=$!;
 	cd $DIR;
 	echo $pid > $PID_SIP;
@@ -102,6 +113,18 @@ function stop_sip {
 	return 0;
 }
 
+function start_z3950 {
+	do_action "start" $PID_Z3950 "OILS Z39.50 Server";
+	simple2zoom -c $OPT_Z3950_CONFIG -- -f $OPT_YAZ_CONFIG >> "$Z3950_LOG" 2>&1 &
+	pid=$!;
+	echo $pid > $PID_Z3950;
+	return 0;
+}
+
+function stop_z3950 {
+	do_action "stop" $PID_Z3950 "OILS Z39.50 Server";
+	return 0;
+}
 
 
 # ---------------------------------------------------------------------------
@@ -111,6 +134,12 @@ case $OPT_ACTION in
 	"start_sip") start_sip;;
 	"stop_sip") stop_sip;;
 	"restart_sip") stop_sip; start_sip;;
+	"start_z3950") start_z3950;;
+	"stop_z3950") stop_z3950;;
+	"restart_z3950") stop_z3950; start_z3950;;
+	"start_all") start_sip; start_z3950;;
+	"stop_all") stop_sip; stop_z3950;;
+	"restart_all") stop_sip; stop_z3950; start_sip; start_z3950;;
 	*) usage;;
 esac;
 
diff --git a/Open-ILS/examples/oils_yaz.xml.example b/Open-ILS/examples/oils_yaz.xml.example
new file mode 100644
index 0000000..df3896d
--- /dev/null
+++ b/Open-ILS/examples/oils_yaz.xml.example
@@ -0,0 +1,14 @@
+<yazgfs>
+  <!-- You can add a listen entry, if you want your z39.50 server to
+       listen on a port other than the default, 9999. -->
+    <server id="server1">
+    <retrievalinfo>
+        <retrieval syntax="xml"/>
+        <retrieval syntax="marc21">
+            <backend syntax="xml">
+                <marc inputformat="xml" outputformat="marc" inputcharset="utf-8" outputcharset="marc-8"/>
+            </backend>
+        </retrieval>
+    </retrievalinfo>
+    </server>
+</yazgfs>
diff --git a/Open-ILS/examples/oils_z3950.xml.example b/Open-ILS/examples/oils_z3950.xml.example
new file mode 100644
index 0000000..6fe8777
--- /dev/null
+++ b/Open-ILS/examples/oils_z3950.xml.example
@@ -0,0 +1,19 @@
+<client>
+   <database name="OILS">
+     <!-- Change "localhost" to your server's name as appropriate. -->
+     <zurl>http://localhost/opac/extras/sru</zurl>
+     <option name="sru">get</option>
+     <charset>marc-8</charset>
+     <search>
+       <querytype>cql</querytype>
+       <map use="4"><index>eg.title</index></map>
+       <map use="7"><index>eg.keyword</index></map>
+       <map use="8"><index>eg.keyword</index></map>
+       <map use="21"><index>eg.subject</index></map>
+       <map use="1003"><index>eg.author</index></map>
+       <map use="1018"><index>eg.publisher</index></map>
+       <map use="1035"><index>eg.keyword</index></map>
+       <map use="1016"><index>eg.keyword</index></map>
+     </search>
+   </database>
+</client>
diff --git a/Open-ILS/src/Makefile.am b/Open-ILS/src/Makefile.am
index 834d71e..796d39c 100644
--- a/Open-ILS/src/Makefile.am
+++ b/Open-ILS/src/Makefile.am
@@ -45,7 +45,9 @@ sysconf_DATA = $(examples)/action_trigger_filters.json.example \
 	       $(examples)/fm_IDL.xml \
 	       $(examples)/oils_sip.xml.example \
 	       $(examples)/oils_web.xml.example \
-	       $(examples)/lib_ips.txt.example
+	       $(examples)/lib_ips.txt.example \
+	       $(examples)/oils_yaz.xml.example \
+	       $(examples)/oils_z3950.xml.example 
 
 #----------------------------
 # Build ILS CORE
@@ -73,7 +75,7 @@ core_scripts =   $(examples)/oils_ctl.sh \
 		 $(supportscr)/action_trigger_runner.pl \
 		 $(srcdir)/extras/openurl_map.pl \
 		 $(srcdir)/extras/import/marc_add_ids
-	 
+
 installautojs = $(autojsbinscripts)
 
 #circ-rules-install
@@ -184,6 +186,8 @@ ilscore-install:
 	sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/long-overdue-status-update.pl'
 	sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/thaw_expired_frozen_holds.srfsh'
 	sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/offline-blocked-list.pl'
+	sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@bindir@/oils_ctl.sh'
+	sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/oils_ctl.sh'
 
 reporter-install:
 	sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/clark-kent.pl'

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/examples/oils_ctl.sh            |   41 +++++++++++++++++++++++++----
 Open-ILS/examples/oils_yaz.xml.example   |   14 ++++++++++
 Open-ILS/examples/oils_z3950.xml.example |   36 ++++++++++++++++++++++++++
 Open-ILS/src/Makefile.am                 |    8 ++++-
 4 files changed, 91 insertions(+), 8 deletions(-)
 create mode 100644 Open-ILS/examples/oils_yaz.xml.example
 create mode 100644 Open-ILS/examples/oils_z3950.xml.example


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list