Bug 25109: Add lockdir configuration entry
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 10 Apr 2020 22:36:09 +0000 (19:36 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 14 Apr 2020 15:56:44 +0000 (16:56 +0100)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Makefile.PL
debian/templates/koha-conf-site.xml.in
etc/koha-conf.xml

index f65e832..4c52f0e 100644 (file)
@@ -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');
index 319f492..44f5576 100644 (file)
@@ -302,6 +302,7 @@ __END_SRU_PUBLICSERVER__
  <useldapserver>0</useldapserver><!-- see C4::Auth_with_ldap for extra configs you must add if you want to turn this on -->
  <useshibboleth>0</useshibboleth><!-- see C4::Auth_with_shibboleth for extra configs you must do to turn this on -->
  <zebra_lockdir>/var/lock/koha/__KOHASITE__</zebra_lockdir>
+ <lockdir>/var/lock/koha/__KOHASITE__</lockdir>
  <use_zebra_facets>1</use_zebra_facets>
  <zebra_max_record_size>1024</zebra_max_record_size>
  <log4perl_conf>__KOHA_CONF_DIR__/log4perl.conf</log4perl_conf>
index 5be267d..ead08aa 100644 (file)
@@ -119,6 +119,7 @@ __PAZPAR2_TOGGLE_XML_POST__
  <useldapserver>0</useldapserver><!-- see C4::Auth_with_ldap for extra configs you must add if you want to turn this on -->
  <useshibboleth>0</useshibboleth><!-- see C4::Auth_with_shibboleth for extra configs you must do to turn this on -->
  <zebra_lockdir>__ZEBRA_LOCK_DIR__</zebra_lockdir>
+ <lockdir>__LOCK_DIR__</lockdir>
  <use_zebra_facets>1</use_zebra_facets>
  <zebra_max_record_size>1024</zebra_max_record_size>
  <log4perl_conf>__KOHA_CONF_DIR__/log4perl.conf</log4perl_conf>