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

Evergreen Git git at git.evergreen-ils.org
Mon Jul 29 13:42:54 EDT 2019


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  fa69633a2d7bfc29be1703c70d8b83c370d3fe57 (commit)
      from  96e819bd9c3d6d53d1f4321f250eab69a4c080a4 (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 fa69633a2d7bfc29be1703c70d8b83c370d3fe57
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date:   Wed Apr 22 17:37:29 2015 +0000

    LP#741788: install the MARC stream importer better
    
    This patch ensures that marc_stream_importer.pl gets
    installed in the Evergreen binary directory and that an
    example configuration file gets installed in the appropriate
    configuration directory (rather than, as in the past,
    the Evergreen bindir).
    
    This patch also causes `oils_header.pl`, which is used by
    other command-line scripts, to be installed in the bin
    directory
    by default.
    
    To test
    -------
    [1] Run a normal Evergreen installation. Verify that
        marc_stream_importer.pl is installed in /openils/bin
        (or the equivalent if you've chosen a non-default installation
        directory) and that marc_stream_importer.conf is
        installed in /openils/conf (or its equivalent)
    [2] (optional) If you have access to OCLC Connexion, verify that you
        can run the MARC stream importer and use it to push records into
        Evergreen.
    
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
    Signed-off-by: Josh Stompro <stomproj at larl.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
    Signed-off-by: Jason Stephenson <jason at sigio.com>

diff --git a/Open-ILS/src/support-scripts/marc_stream_importer.conf b/Open-ILS/examples/marc_stream_importer.conf.example
similarity index 81%
rename from Open-ILS/src/support-scripts/marc_stream_importer.conf
rename to Open-ILS/examples/marc_stream_importer.conf.example
index 329b247aff..7521db51cd 100644
--- a/Open-ILS/src/support-scripts/marc_stream_importer.conf
+++ b/Open-ILS/examples/marc_stream_importer.conf.example
@@ -5,9 +5,9 @@ user        opensrf
 group       opensrf
 
 ### logging ?
-log_file    /openils/var/log/marc_stream_importer.log
+log_file    LOCALSTATEDIR/log/marc_stream_importer.log
 log_level   3
-pid_file    /openils/var/run/marc_stream_importer.pid
+pid_file    LOCALSTATEDIR/run/marc_stream_importer.pid
 
 ### access control
 # allow       .+\.(net|com)
diff --git a/Open-ILS/src/Makefile.am b/Open-ILS/src/Makefile.am
index 33d311264e..9420028df4 100644
--- a/Open-ILS/src/Makefile.am
+++ b/Open-ILS/src/Makefile.am
@@ -41,7 +41,8 @@ sysconf_DATA = $(examples)/action_trigger_filters.json.example \
 	       $(examples)/lib_ips.txt.example \
 	       $(examples)/oils_yaz.xml.example \
 	       $(examples)/kpac.xml.example \
-	       $(examples)/oils_z3950.xml.example 
+	       $(examples)/oils_z3950.xml.example \
+	       $(examples)/marc_stream_importer.conf.example
 
 #----------------------------
 # Build ILS CORE
@@ -67,6 +68,7 @@ core_scripts =   $(examples)/oils_ctl.sh \
 		 $(supportscr)/juv_to_adult.srfsh \
 		 $(supportscr)/thaw_expired_frozen_holds.srfsh \
 		 $(supportscr)/long-overdue-status-update.pl \
+		 $(supportscr)/oils_header.pl \
 		 $(supportscr)/purge_at_events.srfsh \
 		 $(supportscr)/purge_holds.srfsh \
 		 $(supportscr)/purge_circulations.srfsh \
@@ -132,6 +134,7 @@ gen_scripts = \
 	$(supportscr)/authority_authority_linker.pl \
 	$(supportscr)/eg_db_config \
 	$(supportscr)/marc_export \
+	$(supportscr)/marc_stream_importer.pl \
 	$(supportscr)/offline-blocked-list.pl
 
 # config files that are generated from *.in files and can
@@ -228,6 +231,10 @@ $(supportscr)/marc_export: Makefile $(supportscr)/marc_export.in
 	$(do_subst) $(supportscr)/marc_export.in > "$@"
 	chmod 755 "$@"
 
+$(supportscr)/marc_stream_importer.pl: Makefile $(supportscr)/marc_stream_importer.pl.in
+	$(do_subst) $(supportscr)/marc_stream_importer.pl.in > "$@"
+	chmod 755 "$@"
+
 $(supportscr)/offline-blocked-list.pl: Makefile $(supportscr)/offline-blocked-list.pl.in
 	$(do_subst) $(supportscr)/offline-blocked-list.pl.in > "$@"
 	chmod 755 "$@"
@@ -261,6 +268,8 @@ ilscore-install:
 	sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/opensrf.xml.example'
 	sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@sysconfdir@/opensrf.xml.example'
 	sed -i 's|LIBDIR|@libdir@|g' '$(DESTDIR)@sysconfdir@/opensrf.xml.example'
+	sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/marc_stream_importer.conf.example'
+	sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@sysconfdir@/marc_stream_importer.conf.example'
 	sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/autogen.sh'
 	sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@bindir@/autogen.sh'
 	sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@bindir@/autogen.sh'
diff --git a/Open-ILS/src/support-scripts/marc_stream_importer.pl b/Open-ILS/src/support-scripts/marc_stream_importer.pl.in
similarity index 98%
rename from Open-ILS/src/support-scripts/marc_stream_importer.pl
rename to Open-ILS/src/support-scripts/marc_stream_importer.pl.in
index ac46584aca..4f2a1df80e 100755
--- a/Open-ILS/src/support-scripts/marc_stream_importer.pl
+++ b/Open-ILS/src/support-scripts/marc_stream_importer.pl.in
@@ -21,8 +21,9 @@ use strict;
 use warnings;
 use Net::Server::PreFork;
 use base qw/Net::Server::PreFork/;
+use FindBin;
+require "$FindBin::Bin/oils_header.pl";
 
-require 'oils_header.pl';
 use vars qw/$apputils $authtoken/;
 
 use Getopt::Long;
@@ -56,7 +57,7 @@ my $auth_merge_profile_obj;
 
 # options
 my $help        = 0;
-my $osrf_config = '/openils/conf/opensrf_core.xml';
+my $osrf_config = '@sysconfdir@/opensrf_core.xml';
 my $username    = '';
 my $password    = '';
 my $workstation = '';
@@ -88,7 +89,7 @@ my $deprecated_queue;
 
 
 
-my $net_server_conf = fileparse($0, '.pl').'.conf';
+my $net_server_conf = (-r "@sysconfdir@/marc_stream_importer.conf") ? "@sysconfdir@/marc_stream_importer.conf" : undef;
 
 GetOptions(
     'osrf-config=s'         => \$osrf_config,
diff --git a/docs/RELEASE_NOTES_NEXT/Administration/install-marc-stream-importer-in-bin.adoc b/docs/RELEASE_NOTES_NEXT/Administration/install-marc-stream-importer-in-bin.adoc
new file mode 100644
index 0000000000..b25e354e40
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Administration/install-marc-stream-importer-in-bin.adoc
@@ -0,0 +1,14 @@
+Install marc_stream_importer.pl By Default
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+The script for the MARC stream importer, `marc_stream_importer.pl`,
+is now installed in the Evergreen `bin` directory (typically
+`/openils/bin`) by default. It now also expects that its configuration
+file will be in the usual config directory (typically `/openils/conf`)
+and the example configuration file is installed their by default.
+
+Upgrade Note
+++++++++++++
+Because `marc_stream_importer.pl` now expects its configuration file to
+be in the configuration directory, not the binary directory, existing
+users will likely need to manually move the configuration file into
+place.

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

Summary of changes:
 .../marc_stream_importer.conf.example}                     |  4 ++--
 Open-ILS/src/Makefile.am                                   | 11 ++++++++++-
 ...{marc_stream_importer.pl => marc_stream_importer.pl.in} |  7 ++++---
 .../install-marc-stream-importer-in-bin.adoc               | 14 ++++++++++++++
 4 files changed, 30 insertions(+), 6 deletions(-)
 rename Open-ILS/{src/support-scripts/marc_stream_importer.conf => examples/marc_stream_importer.conf.example} (81%)
 rename Open-ILS/src/support-scripts/{marc_stream_importer.pl => marc_stream_importer.pl.in} (98%)
 create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/install-marc-stream-importer-in-bin.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list