From: Dan Scott Date: Tue, 26 Nov 2013 17:44:51 +0000 (-0500) Subject: Address some remaining hardcoded install prefixes X-Git-Tag: sprint4-merge-nov22~2368 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=aa8ea3ca943785ea982d87ad2bf51419812786f2;p=working%2FEvergreen.git Address some remaining hardcoded install prefixes Ran a clean install of Evergreen on Ubuntu Precise and most things were more or less working using simple "./configure; make; make install" with the major exception of the TPAC. It turned out that there is a simple variable that can be tweaked in the Apache config; a better way to handle this might be to preprocess the source file at make time, but for now at least we set the variable. In addition, clean up two remaining scripts that have hardcoded paths. Signed-off-by: Dan Scott Signed-off-by: Ben Shum --- diff --git a/Open-ILS/examples/apache/eg_vhost.conf.in b/Open-ILS/examples/apache/eg_vhost.conf.in index a6476aae62..d1b48f0b90 100644 --- a/Open-ILS/examples/apache/eg_vhost.conf.in +++ b/Open-ILS/examples/apache/eg_vhost.conf.in @@ -33,9 +33,10 @@ RedirectMatch 301 ^/opac/extras/slimpac/start.html$ /opac/en-US/extras/slimpa RedirectMatch 301 ^/opac/extras/slimpac/advanced.html$ /opac/en-US/extras/slimpac/advanced.html # ---------------------------------------------------------------------------------- -# Configure the gateway +# Configure the gateway and translator # ---------------------------------------------------------------------------------- OSRFGatewayConfig @sysconfdir@/opensrf_core.xml +OSRFTranslatorConfig @sysconfdir@/opensrf_core.xml # Translator memcache server. Default is localhost # OSRFTranslatorCacheServer 127.0.0.1:11211 diff --git a/Open-ILS/examples/apache_24/eg_vhost.conf.in b/Open-ILS/examples/apache_24/eg_vhost.conf.in index d561916c23..f6e65e7abe 100644 --- a/Open-ILS/examples/apache_24/eg_vhost.conf.in +++ b/Open-ILS/examples/apache_24/eg_vhost.conf.in @@ -33,9 +33,10 @@ RedirectMatch 301 ^/opac/extras/slimpac/start.html$ /opac/en-US/extras/slimpa RedirectMatch 301 ^/opac/extras/slimpac/advanced.html$ /opac/en-US/extras/slimpac/advanced.html # ---------------------------------------------------------------------------------- -# Configure the gateway +# Configure the gateway and translator # ---------------------------------------------------------------------------------- OSRFGatewayConfig @sysconfdir@/opensrf_core.xml +OSRFTranslatorConfig @sysconfdir@/opensrf_core.xml # Translator memcache server. Default is localhost # OSRFTranslatorCacheServer 127.0.0.1:11211 diff --git a/Open-ILS/src/Makefile.am b/Open-ILS/src/Makefile.am index 5c57f9239a..5d159de43d 100644 --- a/Open-ILS/src/Makefile.am +++ b/Open-ILS/src/Makefile.am @@ -33,8 +33,7 @@ supportscr = @srcdir@/support-scripts # Collect files to be used by multiple targets -autojsbinscripts = @srcdir@/extras/autogen.sh \ - @srcdir@/support-scripts/offline-blocked-list.pl +autojsbinscripts = @srcdir@/extras/autogen.sh # Decide which entities to build @@ -71,7 +70,6 @@ core_scripts = $(examples)/oils_ctl.sh \ $(supportscr)/juv_to_adult.srfsh \ $(supportscr)/thaw_expired_frozen_holds.srfsh \ $(supportscr)/long-overdue-status-update.pl \ - $(supportscr)/action_trigger_runner.pl \ $(supportscr)/purge_holds.srfsh \ $(supportscr)/purge_circulations.srfsh \ $(srcdir)/extras/eg_config \ @@ -141,10 +139,12 @@ gen_scripts = \ @srcdir@/extras/import/marc2bre.pl \ @srcdir@/extras/import/marc2sre.pl \ @srcdir@/extras/import/parallel_pg_loader.pl \ + $(supportscr)/action_trigger_runner.pl \ $(supportscr)/authority_control_fields.pl \ $(supportscr)/authority_authority_linker.pl \ $(supportscr)/eg_db_config \ - $(supportscr)/marc_export + $(supportscr)/marc_export \ + $(supportscr)/offline-blocked-list.pl gen_docs = \ $(examples)/apache/eg.conf \ @@ -220,6 +220,10 @@ uninstall-hook: $(do_subst) @srcdir@/extras/import/parallel_pg_loader.pl.in > "$@" chmod 755 "$@" +$(supportscr)/action_trigger_runner.pl: Makefile $(supportscr)/action_trigger_runner.pl.in + $(do_subst) $(supportscr)/action_trigger_runner.pl.in > "$@" + chmod 755 "$@" + $(supportscr)/authority_authority_linker.pl: Makefile $(supportscr)/authority_authority_linker.pl.in $(do_subst) $(supportscr)/authority_authority_linker.pl.in > "$@" chmod 755 "$@" @@ -236,6 +240,10 @@ $(supportscr)/marc_export: Makefile $(supportscr)/marc_export.in $(do_subst) $(supportscr)/marc_export.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 "$@" + $(examples)/apache/eg.conf: Makefile $(examples)/apache/eg.conf.in $(do_subst) $(examples)/apache/eg.conf.in > "$@" @@ -281,7 +289,6 @@ ilscore-install: sed -i 's|BINDIR|@bindir@|g' '$(DESTDIR)@bindir@/long-overdue-status-update.pl' 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' diff --git a/Open-ILS/src/support-scripts/action_trigger_runner.pl b/Open-ILS/src/support-scripts/action_trigger_runner.pl deleted file mode 100755 index 9e219f0fbe..0000000000 --- a/Open-ILS/src/support-scripts/action_trigger_runner.pl +++ /dev/null @@ -1,248 +0,0 @@ -#!/usr/bin/perl -# --------------------------------------------------------------- -# Copyright (C) 2009 Equinox Software, Inc -# Author: Bill Erickson -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# --------------------------------------------------------------- -use strict; -use warnings; -use Getopt::Long; -use OpenSRF::System; -use OpenSRF::AppSession; -use OpenSRF::Utils::JSON; -use OpenSRF::Utils::Logger qw/$logger/; -use OpenSRF::EX qw(:try); -use OpenILS::Utils::Fieldmapper; -my $req_timeout = 10800; - -# DEFAULT values - -my $opt_lockfile = '/tmp/action-trigger-LOCK'; -my $opt_osrf_config = '/openils/conf/opensrf_core.xml'; -my $opt_custom_filter = '/openils/conf/action_trigger_filters.json'; -my $opt_max_sleep = 3600; # default to 1 hour -my $opt_run_pending = 0; -my $opt_debug_stdout = 0; -my $opt_help = 0; -my $opt_verbose; -my $opt_hooks; -my $opt_process_hooks = 0; -my $opt_granularity = undef; -my $opt_gran_only = undef; - -(-f $opt_custom_filter) or undef($opt_custom_filter); # discard default if no file exists - -GetOptions( - 'max-sleep' => \$opt_max_sleep, - 'osrf-config=s' => \$opt_osrf_config, - 'run-pending' => \$opt_run_pending, - 'hooks=s' => \$opt_hooks, - 'granularity=s' => \$opt_granularity, - 'granularity-only' => \$opt_gran_only, - 'process-hooks' => \$opt_process_hooks, - 'debug-stdout' => \$opt_debug_stdout, - 'custom-filters=s' => \$opt_custom_filter, - 'lock-file=s' => \$opt_lockfile, - 'verbose' => \$opt_verbose, - 'help' => \$opt_help, -); - -my $max_sleep = $opt_max_sleep; - -#XXX need to figure out why this is required... -$opt_gran_only = $opt_granularity ? 1 : 0; - -$opt_lockfile .= '.' . $opt_granularity if ($opt_granularity && $opt_gran_only); - -# typical passive hook filters -my $hook_handlers = { - - # default overdue circulations - 'checkout.due' => { - context_org => 'circ_lib', - filter => { - checkin_time => undef, - '-or' => [ - {stop_fines => ['MAXFINES']}, - {stop_fines => undef} - ] - } - } -}; - -if ($opt_custom_filter) { - open FILTERS, $opt_custom_filter or die "Cannot read custom filters at $opt_custom_filter"; - $hook_handlers = OpenSRF::Utils::JSON->JSON2perl(join('',())); - close FILTERS; -} - -sub help { - print < - OpenSRF core config file. Defaults to: - /openils/conf/opensrf_core.xml - - --custom-filters= - File containing a JSON Object which describes any hooks that should - use a user-defined filter to find their target objects. Defaults to: - /openils/conf/action_trigger_filters.json - - --run-pending - Run pending events - - --process-hooks - Create hook events - - --max-sleep= - When in process-hooks mode, wait up to for the lock file to - go away. Defaults to 3600 (1 hour). - - --hooks=hook1[,hook2,hook3,...] - Define which hooks to create events for. If none are defined, - it defaults to the list of hooks defined in the --custom-filters option. - - --granularity=