From 936976a1fe9d0996c22e1b3727d5782a9f114cb2 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 10 Apr 2020 19:36:09 -0300 Subject: [PATCH] Bug 25109: Add lockdir configuration entry Signed-off-by: Kyle M Hall Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- Makefile.PL | 9 +++++++++ debian/templates/koha-conf-site.xml.in | 1 + etc/koha-conf.xml | 1 + 3 files changed, 11 insertions(+) diff --git a/Makefile.PL b/Makefile.PL index f65e832e8b..4c52f0e04e 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -264,6 +264,10 @@ contain information of interest to Koha developers. Directory for Koha documentation accessed from the command-line, e.g., READMEs. +=item LOCK_DIR + +Directory for Koha scripts to put their locks. + =item LOG_DIR Directory for Apache and Zebra logs produced by Koha. @@ -359,6 +363,7 @@ my $target_map = { './serials' => 'INTRANET_CGI_DIR', './services' => 'INTRANET_CGI_DIR', './skel' => 'NONE', + './skel/var/lock/koha' => { target => 'LOCK_DIR', trimdir => -1 }, './skel/var/log/koha' => { target => 'LOG_DIR', trimdir => -1 }, './skel/var/spool/koha' => { target => 'BACKUP_DIR', trimdir => -1 }, './skel/var/run/koha/zebradb' => { target => 'ZEBRA_RUN_DIR', trimdir => -1 }, @@ -664,6 +669,7 @@ my %test_suite_override_dirs = ( KOHA_CONF_DIR => ['etc'], ZEBRA_CONF_DIR => ['etc', 'zebradb'], Z3950_CONF_DIR => ['etc', 'z3950'], + LOCK_DIR => ['var', 'lock'], LOG_DIR => ['var', 'log'], BACKUP_DIR => ['var', 'spool'], SCRIPT_DIR => ['bin'], @@ -1393,6 +1399,7 @@ sub get_target_directories { $dirmap{'MAN_DIR'} = File::Spec->catdir(@basedir, $package, 'man'); $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc'); $dirmap{'ZEBRA_LOCK_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lock', 'zebradb'); + $dirmap{'LOCK_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lock'); $dirmap{'LOG_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'log'); $dirmap{'BACKUP_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'spool'); $dirmap{'PLUGINS_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lib', 'koha', 'plugins'); @@ -1429,6 +1436,7 @@ sub get_target_directories { $dirmap{'MAN_DIR'} = File::Spec->catdir(@basedir, $package, 'man'); $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc'); $dirmap{'ZEBRA_LOCK_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lock', 'zebradb'); + $dirmap{'LOCK_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lock'); $dirmap{'LOG_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'log'); $dirmap{'BACKUP_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'spool'); $dirmap{'PLUGINS_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'lib', 'plugins'); @@ -1454,6 +1462,7 @@ sub get_target_directories { $dirmap{'MAN_DIR'} = File::Spec->catdir(@basedir, $package, 'man'); $dirmap{'DOC_DIR'} = File::Spec->catdir(@basedir, $package, 'doc'); $dirmap{'ZEBRA_LOCK_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'var', 'lock', $package, 'zebradb'); + $dirmap{'LOCK_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'var', 'lock', $package); $dirmap{'LOG_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'var', 'log', $package); $dirmap{'BACKUP_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'var', 'spool', $package); $dirmap{'PLUGINS_DIR'} = File::Spec->catdir(File::Spec->rootdir(), 'var', 'lib', $package, 'plugins'); diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in index 319f492c23..44f557637d 100644 --- a/debian/templates/koha-conf-site.xml.in +++ b/debian/templates/koha-conf-site.xml.in @@ -302,6 +302,7 @@ __END_SRU_PUBLICSERVER__ 0 0 /var/lock/koha/__KOHASITE__ + /var/lock/koha/__KOHASITE__ 1 1024 __KOHA_CONF_DIR__/log4perl.conf diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml index 5be267d656..ead08aab73 100644 --- a/etc/koha-conf.xml +++ b/etc/koha-conf.xml @@ -119,6 +119,7 @@ __PAZPAR2_TOGGLE_XML_POST__ 0 0 __ZEBRA_LOCK_DIR__ + __LOCK_DIR__ 1 1024 __KOHA_CONF_DIR__/log4perl.conf -- 2.39.5