From aa8ea3ca943785ea982d87ad2bf51419812786f2 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Tue, 26 Nov 2013 12:44:51 -0500 Subject: [PATCH] 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 --- Open-ILS/examples/apache/eg_vhost.conf.in | 3 ++- Open-ILS/examples/apache_24/eg_vhost.conf.in | 3 ++- Open-ILS/src/Makefile.am | 17 ++++++++++++----- ...on_trigger_runner.pl => action_trigger_runner.pl.in} | 12 ++++++------ ...fline-blocked-list.pl => offline-blocked-list.pl.in} | 10 +++++----- 5 files changed, 27 insertions(+), 18 deletions(-) rename Open-ILS/src/support-scripts/{action_trigger_runner.pl => action_trigger_runner.pl.in} (95%) rename Open-ILS/src/support-scripts/{offline-blocked-list.pl => offline-blocked-list.pl.in} (94%) 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.in similarity index 95% rename from Open-ILS/src/support-scripts/action_trigger_runner.pl rename to Open-ILS/src/support-scripts/action_trigger_runner.pl.in index 9e219f0fbe..0527e2f2d2 100755 --- a/Open-ILS/src/support-scripts/action_trigger_runner.pl +++ b/Open-ILS/src/support-scripts/action_trigger_runner.pl.in @@ -27,8 +27,8 @@ 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_osrf_config = '@sysconfdir@/opensrf_core.xml'; +my $opt_custom_filter = '@sysconfdir@/action_trigger_filters.json'; my $opt_max_sleep = 3600; # default to 1 hour my $opt_run_pending = 0; my $opt_debug_stdout = 0; @@ -92,12 +92,12 @@ $0 : Create and process action/trigger events --osrf-config= OpenSRF core config file. Defaults to: - /openils/conf/opensrf_core.xml + @sysconfdir@/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 + @sysconfdir@/action_trigger_filters.json --run-pending Run pending events @@ -132,10 +132,10 @@ $0 : Create and process action/trigger events # To run all pending events. This is what you tell CRON to run at # regular intervals - perl $0 --osrf-config /openils/conf/opensrf_core.xml --run-pending + perl $0 --osrf-config @sysconfdir@/opensrf_core.xml --run-pending # To batch create all "checkout.due" events - perl $0 --osrf-config /openils/conf/opensrf_core.xml --hooks checkout.due + perl $0 --osrf-config @sysconfdir@/opensrf_core.xml --hooks checkout.due HELP } diff --git a/Open-ILS/src/support-scripts/offline-blocked-list.pl b/Open-ILS/src/support-scripts/offline-blocked-list.pl.in similarity index 94% rename from Open-ILS/src/support-scripts/offline-blocked-list.pl rename to Open-ILS/src/support-scripts/offline-blocked-list.pl.in index 8ff031af40..0d786a0b9e 100755 --- a/Open-ILS/src/support-scripts/offline-blocked-list.pl +++ b/Open-ILS/src/support-scripts/offline-blocked-list.pl.in @@ -32,8 +32,8 @@ OPTIONS: --verbose give feedback on STDERR, including number of barcodes fetched --help print this message ---config =[file] core config file default: /openils/conf/opensrf_core.xml ---requestor=[/path/to/requstor] default: /openils/bin/oils_requestor +--config =[file] core config file default: @sysconfdir@/opensrf_core.xml +--requestor=[/path/to/requstor] default: @sysconfdir@/bin/oils_requestor --hostname =[my.fqdn.com] default: hostfqdn() (Only used by new style.) May be necessary if hostfqdn does not match router configs. @@ -49,7 +49,7 @@ OPTIONS: EXAMPLES: # Use the old style with a custom config -$0 --config /openils/conf/test_core.xml --oldstyle +$0 --config @sysconfdir@/conf/test_core.xml --oldstyle # Append just lost and barred barcodes to file, showing feedback on STDERR $0 --verbose --barcodes L=lost --barcodes B=barred >>file @@ -62,8 +62,8 @@ END_OF_USAGE ### DEFAULTS -my $config = '/openils/conf/opensrf_core.xml'; -my $oils_reqr = '/openils/bin/oils_requestor'; +my $config = '@sysconfdir@/opensrf_core.xml'; +my $oils_reqr = '@bindir@/oils_requestor'; my $context = 'opensrf'; my $hostname = hostfqdn(); my $help = 0; -- 2.11.0