Bugzilla – Attachment 101018 Details for
Bug 24905
log4perl-site.conf.in missing entries for the z39.50 server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24905: Make installer update log4perl.conf for instances
Bug-24905-Make-installer-update-log4perlconf-for-i.patch (text/plain), 2.72 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-03-19 14:05:24 UTC
(
hide
)
Description:
Bug 24905: Make installer update log4perl.conf for instances
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-03-19 14:05:24 UTC
Size:
2.72 KB
patch
obsolete
>From 733c55b92fb36dd851c1053b00c50533feae2c88 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 19 Mar 2020 10:51:40 -0300 >Subject: [PATCH] Bug 24905: Make installer update log4perl.conf for instances > >This patch makes koha-common.postinst check if the log4perl.conf files >on the instances need tweaking. If they do, it appends the relevant >configuration text. > >To test: >1. Install Koha 19.11 or earlier using the packages >2. Create an instance: > $ koha-create --create-db test1 > $ koha-create --create-db test2 >=> FAIL: /etc/koha/sites/test1/log4perl.conf doesn't include an entry for >z39.50 >3. Apply this patch and run: > $ docker run \ > --volume=/path/to/your/clone:/koha \ > --volume=/dest/path/for/debs:/debs \ > --privileged > --env VERSION=19.12.00.047 \ > koha/koha-dpkg:master >Note: Paths need to be adjusted >4. Grab the .deb files and put them on the machine you're testing this >5. Edit /etc/koha/sites/test2/log4perl.conf and add the following text > at the bottom: log4perl.logger.z3950 >6. Install the debs: > $ sudo dpkg -i koha-perldeps koha-deps koha-common >=> SUCCESS: Install process doesn't explode due to the addition >=> SUCCESS: /etc/koha/sites/test1/log4perl.conf has a new entry for log4perl.logger.z3950 >=> SUCCESS: /etc/koha/sites/test2/log4perl.conf doesn't have a new entry for log4perl.logger.z3950 >7. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > debian/koha-common.postinst | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) > >diff --git a/debian/koha-common.postinst b/debian/koha-common.postinst >index b5f72cdf5f..10cb9d571f 100644 >--- a/debian/koha-common.postinst >+++ b/debian/koha-common.postinst >@@ -131,6 +131,34 @@ EOF > fi > fi > >+log4perl_component() >+{ >+ local config=$1 >+ local component=$2 >+ >+ if [ grep -q -x "log4perl.logger.$component" $config ]; then >+ return 0 >+ else >+ return 1 >+ fi >+} >+ >+# Take care of the instance's log4perl.conf file >+for site in $(koha-list); do >+ log4perl_config="/etc/koha/sites/$site/log4perl.conf" >+ if [ !log4perl_component $log4perl_config "z3950" ]; then >+ cat <<EOF >> $log4perl_config >+log4perl.logger.z3950 = WARN, Z3950 >+log4perl.appender.Z3950=Log::Log4perl::Appender::File >+log4perl.appender.Z3950.filename=__LOG_DIR__/z3950-error.log >+log4perl.appender.Z3950.mode=append >+log4perl.appender.Z3950.layout=PatternLayout >+log4perl.appender.Z3950.layout.ConversionPattern=[%d] [%p] %m %l %n >+ >+EOF >+ fi >+done >+ > # Bug 14106 - fix the modulePath of existing koha instances so that it'll > # continue to work. This will only patch the files if the exact original string > # that we're fixing them from is there, so we just run it every time. Maybe >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24905
:
101017
|
101018
|
101020
|
101893
|
101894