[koha-commits] main Koha release repository branch 17.05.x updated. v17.05.10-12-g38d62ce

Git repo owner gitmaster at git.koha-community.org
Tue Apr 10 09:44:00 CEST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "main Koha release repository".

The branch, 17.05.x has been updated
       via  38d62cec1d25efd6503305019e92a099bbb1d0f5 (commit)
       via  54a294571ffc2c9fc0edccba448cf67133205658 (commit)
       via  2253956f6915dbe4d4164a094a437ad9fd89f204 (commit)
       via  c7a31a846a9efd01b7cf18893b2da7669d966e3f (commit)
       via  67cecb7f752f9a3be3769bbf5bd75a7aa02bd3de (commit)
       via  d6367c4b431091ef90263f0d49d5dc3d8ef7996c (commit)
       via  6e58877b7d8526228003d4dadb51977d44dbe653 (commit)
       via  8aad3268b589e7659a6d4a64efa7f0af84927a8a (commit)
       via  2342acfca77a2352a76ec6cca267e6a056dedf34 (commit)
       via  48141d57f1d5e124e60b85221926d55fae470a94 (commit)
       via  443fb91be5805863633439afb4b2eefb7a164112 (commit)
       via  f7b67d01fd98927cf34b9699d1ee998382ba269f (commit)
      from  2f22ee7576fb76acbae722f41208f52cb1af9ef3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 38d62cec1d25efd6503305019e92a099bbb1d0f5
Author: Josef Moravec <josef.moravec at gmail.com>
Date:   Fri Mar 9 06:58:34 2018 +0000

    Bug 12812: (Follow-up) Fix use of C4::Circulation
    
    Fixes this error:
    Undefined subroutine &main::MarkIssueReturned called at
    misc/cronjobs/longoverdue.pl line 316.
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    Signed-off-by: Julian Maurice <julian.maurice at biblibre.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 4aaf30dfd87289a63e27073be90062db04a32dc1)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 54a294571ffc2c9fc0edccba448cf67133205658
Author: Kyle M Hall <kyle at bywatetsolutions.com>
Date:   Thu Feb 8 06:39:39 2018 -0500

    Bug 12812: Longoverdue.pl --mark-returned doesn't return items
    
    The longoverdue.pl option --mark-returned doesn't work unless the
    --charge option is used as well.
    
    Test Plan:
    1) Run long overdue with --mark-returned and not --charge,
       note your items are marked lost but not returned
    2) Apply this patch
    3) Repeat step 1, the items should now get returned!
    
    Tested with (for example):
    misc/cronjobs/longoverdue.pl --lost 10=1 --mark-returned --verbose
    --confirm
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    Signed-off-by: Julian Maurice <julian.maurice at biblibre.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 93c5c8e4c85ed3330184de2c6ea06ab73803656b)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 2253956f6915dbe4d4164a094a437ad9fd89f204
Author: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date:   Mon Mar 5 11:30:15 2018 +0100

    Bug 17717: (QA follow-up) Fix typo chdir
    
    This test does obviously not achieve the desired result:
        [ "chdir" != "no" ]
    Trivial fix.
    Adding the same quotes around starting_dir (just as for Bug 19546).
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 7c55ea5917998bc210d3ee632f0a8ea6beefff5f)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit c7a31a846a9efd01b7cf18893b2da7669d966e3f
Author: Tomas Cohen Arazi <tomascohen at gmail.com>
Date:   Fri Mar 2 11:51:20 2018 -0300

    Bug 17717: Make cronjobs using koha-foreach use --chdir
    
    In order to patch production sites we need to adjust the shipped
    cronjobs so they are called with the --chdir option switch.
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 37750b2f20f63bec2de330533bb4d9a82171e9c1)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 67cecb7f752f9a3be3769bbf5bd75a7aa02bd3de
Author: Tomas Cohen Arazi <tomascohen at gmail.com>
Date:   Fri Mar 2 11:17:40 2018 -0300

    Bug 17717: Add a --chdir option switch for koha-foreach
    
    Until Perl 5.26, the current directory is added to @INC when running a
    Perl script [1]. Having the current directory in @INC means it can be
    tried to be traversed when performing a lib lookup. Since version 5.18,
    Perl dies when it finds an unreadable directory (permissions) in @INC
    that needs to be traversed. This behaviour won't change because Perl
    devs consider it an enhancement to security. [2]
    
    Because of this, we need to make sure our scripts are ran **from** a
    directory in which they have read permissions.
    
    Ths patch adds a --chdir option switch to the **koha-foreach** wrapper
    script, that makes the inner shells/scripts to be ran within the Koha
    instance's user home directory.
    
    The change is trivial and should be QAed easily. I tested this on a prod
    server:
    
    - Create a /tmp/test.pl file containing:
    
    use Modern::Perl;
    
    use Cwd;
    my $dir = getcwd;
    
    warn $dir;
    
    1;
    
    A) then create a cronjob entry to run it using koha-foreach:
    (in /etc/cron.d/test):
    1/* * * * * root koha-foreach perl /tmp/test.pl
    - Once I noticed the cronjob ran, I used mutt to read the emails in the
    root user.
    => FAIL:
    ...
    Subject: Cron <root at koha> koha-foreach --enabled perl /tmp/test.pl
    
    "/root"
    "/root"
    "/root"
    "/root"
    "/root"
    ...
    
    B) I then used the patched koha-foreach with different results:
    => SUCCESS:
    ...
    Subject: Cron <root at koha> /root/koha-foreach --chdir --enabled perl /tmp/test.pl
    
    "/var/lib/koha/acaderc"
    "/var/lib/koha/agro"
    "/var/lib/koha/anc"
    "/var/lib/koha/arico"
    "/var/lib/koha/artes"
    ...
    
    So this patch's approach works. But...
    
    C) master's koha-foreach seems to work just the same... I think it is
    because of my previous attempt to fix this by using sudo in koha-shell.
    So I think environmental conditions affect the behaviour (which shell is
    configured for cron, sudo configuration, etc).
    
    ====
    
    In conclusion, I think we should go ahead with this patch as it will solve
    peoples issues, and it is a right solution (option #5 on the list) to
    this Perl behaviour change. It doesn't cover other commands, but
    followup patches could do.
    
    I avoided /tmp as it is writable by any user... so it is an easy path
    for both exploiting by replacing some lib, and also because the
    existence of an unreadable dir that the interpreter could try to
    traverse (unreadable /tmp/Authen or /tmp/Koha will trigger the same
    error, and I assume people know what they are putting on the instance's
    dir, at least it will be easier to track).
    
    A followup patch takes care of making the cronjobs use --chdir when
    calling koha-foreach
    
    [1] https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html
    [2] https://rt.perl.org/Public/Bug/Display.html?id=123795
    
    Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 3db7e1a63a517ad03a5426504ef4010beae0c8bf)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit d6367c4b431091ef90263f0d49d5dc3d8ef7996c
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Tue Jun 27 11:55:45 2017 -0300

    Bug 18709: Make koha-foreach use koha-shell internally
    
    This patch simplifies the koha-foreach script, making it use koha-shell
    to gain instance privileges and have all environment variables set.
    
    To test:
    - Apply the patch
    - Have one or more instances created (kohadev already exists in kohadevbox, add
      another onewith $ sudo koha-create --create-db test)
    - Run:
      $ sudo kohaclone/debian/scripts/koha-foreach echo "This is instance __instancename__"
    => SUCCESS: The script runs gracefuly, and outputs something like:
    This is instance kohadev
    This is instance test
      Note: this means the command was executed for each instance and the current behaviour
            of replacing the placeholder __instancename__ for the actual instance name still
            works as expected.
    - You can try the different filter switches, but the logic has not been touched. only the
      command call.
    - Sign off :-D
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit 75994dc94a2f5d1a500a7789ed113575c49f8b51)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 6e58877b7d8526228003d4dadb51977d44dbe653
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Tue Feb 27 15:30:18 2018 -0300

    Bug 20286: Fix filter for BakerTaylor* prefs
    
    Signed-off-by: Brendan Gallagher <brendan at bywatersolutions.com>
    Signed-off-by: Julian Maurice <julian.maurice at biblibre.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit a1940ace4187e5f94bac82830a92481e85e9c6d0)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 8aad3268b589e7659a6d4a64efa7f0af84927a8a
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Mon Feb 26 10:48:18 2018 -0300

    Bug 20286: Correctly escape URI characters in OPAC RSS template
    
    Bug 19568 use the TT filter url whereas it must have escaped the URI
    characters with the uri filter.
    
    Test plan:
    Subscribe to an OPAC search
    => Without this patch you will get an empty page
    => With this patch applied you will see result list.
    
    Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
    
    Signed-off-by: Brendan Gallagher <brendan at bywatersolutions.com>
    Signed-off-by: Julian Maurice <julian.maurice at biblibre.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    (cherry picked from commit 5de7dc040dbb1e6ebae49a64aac8f4a7c19d4091)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 2342acfca77a2352a76ec6cca267e6a056dedf34
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Wed Feb 28 13:54:32 2018 -0300

    Bug 20311: Prevent get_age tests to fail on Feb 28th
    
    Today Feb 28th 2018:
    If we subtract 18y to this DateTime object 29/02/2000 and so the patron is not major yet
    
    use Koha::DateUtils qw( dt_from_string );
    say dt_from_string('28/02/2018')->add(years => -18);
    say dt_from_string('28/02/2018')->add(years => -18, end_of_month => 'limit');
    
    will display:
    2000-02-29T00:00:00
    2000-02-28T00:00:00
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit 72de4ddaeed5e12a86414e6b965cb6f5a4a76ce1)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 48141d57f1d5e124e60b85221926d55fae470a94
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Sat Feb 17 11:50:16 2018 -0300

    Bug 20234: Update service description in koha-common.init
    
    The service description is very old and outdated. This patch fixes this.
    
    Sponsored-by: Orex Digital
    
    Signed-off-by: Hugo Agud hagud at orex.es
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit 362c0e0cd1035222ee43febae88cab73c410f41e)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit 443fb91be5805863633439afb4b2eefb7a164112
Author: Tomas Cohen Arazi <tomascohen at theke.io>
Date:   Sat Feb 17 11:34:58 2018 -0300

    Bug 20234: Make maintenance scripts use koha-zebra instead of koha-*-zebra
    
    This patch makes all maintenance scripts use **koha-zebra** instead of
    the old **koha-*-zebra** scripts.
    
    To test:
    - Run:
      $ perl misc4dev/cp_debian_files.pl
      $ sudo service koha-common stop
    => SUCCESS: No errors and the Zebra-related sevices are stopped
      $ sudo service koha-common start
    => SUCCESS: No errors and the Zebra-related services are started
      $ sudo service koha-common restart
    => SUCCESS: No erros and Zebra-related services are running
      $ sudo koha-create --create-db test
    => SUCCESS: Instance created and zebra running for it
      $ sudo koha-disable test
    => SUCCESS: No errors and Zebra is stopped for instance test
      $ sudo koha-zebra --start test
      $ sudo koha-remove test
    => SUCCESS: No errors, instance removed, no Zebra running for test
    - Sign off :-D
    
    Sponsored-by: Orex Digital
    
    Signed-off-by:  Hugo Agud hagud at orex.es
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit 900f3437622c3d3df4fc8cf782161c9b9eea844f)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

commit f7b67d01fd98927cf34b9699d1ee998382ba269f
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Fri Feb 16 12:23:26 2018 -0300

    Bug 20229: Explicitly list the SQL modes we support
    
    In our installation procedure we ask the administrator to edit the
    MySQL|MariaDB configuration file to specify the SQL modes we support
    (see bug 17258 comment 6 and 7 for more information).
    
    We are on the way to catch and fix all these issues and support these
    stricter modes (as they highlight problem in our codebase/DB structure)
    but in the meanwhile it may be good to remove this step and revert the
    changes when we are ready.
    
    TODO:
    - Remove that for dev installations (to let developers catch these bugs)
    - Edit the wiki page to remove this step
    
    Test plan:
    0. Do not apply this patch
    1. Edit your MySQL|MariaDB config and add:
    sql-mode = "ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
    to the [mysqld] section (or edit it)
    2. Restart your DBMS
    3. Try to make the app explode (watch the logs)
    (tips: you should get "'koha_kohadev.me.id' isn't in GROUP BY" when
    editing an order)
    4. Apply the patch, restart_all, restart your DBMS
    5. Try to recreate the failure
    => You should no longer see the error in the logs
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
    Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
    
    Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
    (cherry picked from commit 4dfdf061badfa40954022653326c3166448ae5bf)
    Signed-off-by: Fridolin Somers <fridolin.somers at biblibre.com>

-----------------------------------------------------------------------

Summary of changes:
 Koha/Database.pm                                   |    4 ++-
 debian/docs/koha-foreach.xml                       |   17 ++++++++++--
 debian/koha-common.cron.d                          |    2 +-
 debian/koha-common.cron.daily                      |   24 ++++++++--------
 debian/koha-common.cron.hourly                     |    2 +-
 debian/koha-common.cron.monthly                    |    2 +-
 debian/koha-common.init                            |   16 ++++++-----
 debian/koha-common.logrotate                       |    4 +--
 debian/scripts/koha-create                         |    2 +-
 debian/scripts/koha-disable                        |    2 +-
 debian/scripts/koha-foreach                        |   29 +++++++++++---------
 debian/scripts/koha-remove                         |    2 +-
 .../bootstrap/en/modules/opac-opensearch.tt        |    8 +++---
 misc/cronjobs/longoverdue.pl                       |    9 ++++--
 t/db_dependent/Koha/Patrons.t                      |   12 ++++----
 15 files changed, 80 insertions(+), 55 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list