Bug 16084: log4perl.conf not properly set on packages
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 16 Mar 2016 19:21:32 +0000 (16:21 -0300)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Fri, 25 Mar 2016 21:07:54 +0000 (21:07 +0000)
- Run koha-create to create an instance or just fire kohadevbox:ansible
=> FAIL: Notice the instance's koha-conf.xml points to __KOHA_CONF_DIR__
         instead of /etc/koha/sites/kohadev/ on the log4perl entry.
=> FAIL: the /etc/koha/sites/kohadev/log4perl.conf contains __LOG_DIR__
         instead of /var/log/koha/kohadev/
- Apply this patch and pick the koha-conf-site.xml.in and koha-create files
- Create a new instance
=> SUCCESS: All placeholders are filled correctly.
- Sign off

Regards

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com

debian/scripts/koha-create
debian/templates/koha-conf-site.xml.in

index a36f7e3..2a6c87d 100755 (executable)
@@ -84,7 +84,8 @@ generate_config_file() {
     touch "$2"
     chown "root:$username" "$2"
     chmod 0640 "$2"
-    sed -e "s/__KOHASITE__/$name/g" \
+    sed -e "s/__KOHA_CONF_DIR__/\/etc\/koha\/sites\/$name/g" \
+        -e "s/__KOHASITE__/$name/g" \
         -e "s/__OPACPORT__/$OPACPORT/g" \
         -e "s/__INTRAPORT__/$INTRAPORT/g" \
         -e "s/__OPACSERVER__/$opacdomain/g" \
@@ -110,6 +111,7 @@ generate_config_file() {
         -e "s/__UNIXUSER__/$username/g" \
         -e "s/__UNIXGROUP__/$username/g" \
         -e "s#__UPLOAD_PATH__#$UPLOAD_PATH#g" \
+        -e "s/__LOG_DIR__/\/var\/log\/koha\/$name/g" \
         -e "s/__PLUGINS_DIR__/\/var\/lib\/koha\/$name\/plugins/g" \
         -e "s/__MEMCACHED_NAMESPACE__/$MEMCACHED_NAMESPACE/g" \
         -e "s/__MEMCACHED_SERVERS__/$MEMCACHED_SERVERS/g" \
index 51a9d86..fc4ad04 100644 (file)
@@ -266,7 +266,7 @@ __END_SRU_PUBLICSERVER__
  <opachtdocs>/usr/share/koha/opac/htdocs/opac-tmpl</opachtdocs>
  <intrahtdocs>/usr/share/koha/intranet/htdocs/intranet-tmpl</intrahtdocs>
  <includes>/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/includes/</includes>
- <logdir>/var/log/koha/__KOHASITE__</logdir>
+ <logdir>__LOG_DIR__</logdir>
  <docdir>/usr/share/doc/koha-common</docdir>
  <backupdir>/var/spool/koha/__KOHASITE__</backupdir>
  <!-- Enable the two following to allow superlibrarians to download