[koha-commits] main Koha release repository branch master updated. v17.11.00-794-gbb97767

Git repo owner gitmaster at git.koha-community.org
Thu Mar 15 10:28:34 CET 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, master has been updated
       via  bb97767501a016609743c354b781a0783eb6e66b (commit)
       via  c8f6a351aceabef991a3ee4a8efa9e37b4d246d7 (commit)
       via  37d6bafcf8b8a1570a0344b9817eb6f95f23ce42 (commit)
       via  a36c1051787e0ebea106081f2ff02cf8a8ebffb4 (commit)
       via  4e3c60a19295394a5e0c9357504b5efc4228e059 (commit)
       via  4a90619e583be270dd4e581057a2fc30f48c4537 (commit)
       via  4f5d525d66f1436fb1a74f4fc9da3a0d17168e75 (commit)
       via  00374d0741b5c94ccdbbbc36164d4ef099ab3e2c (commit)
       via  d4e444a01db991f54a771bbca1e689f959ac066c (commit)
       via  6db09ad3b070845539994ff4f1f8b9f7d6d2dfc8 (commit)
       via  f312f83dbc14de6e31e15a36f03d5532f5396a8d (commit)
       via  184541269307726d7b457ff8beb9637adcd5016b (commit)
      from  48c764bd752c1e692aaea80cf54a09c810db5b9c (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 bb97767501a016609743c354b781a0783eb6e66b
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>

commit c8f6a351aceabef991a3ee4a8efa9e37b4d246d7
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>

commit 37d6bafcf8b8a1570a0344b9817eb6f95f23ce42
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Tue Feb 27 15:54:38 2018 -0300

    Bug 20303: Do not explode when receiving an order if authorisedby not set
    
    Signed-off-by: Mark Tompsett <mtompset at hotmail.com>
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

commit a36c1051787e0ebea106081f2ff02cf8a8ebffb4
Author: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
Date:   Mon Mar 5 10:27:33 2018 +0100

    Bug 19546: (QA follow-up) Make the returning cd more fool proof
    
    Trivial and hypothetical fix.
    If you create /root/AA B (space in dirname), the quotes added here will
    help you to get back where you came from.
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

commit 4e3c60a19295394a5e0c9357504b5efc4228e059
Author: Tomas Cohen Arazi <tomascohen at gmail.com>
Date:   Fri Mar 2 10:36:34 2018 -0300

    Bug 19546: Run starman from the instance's home dir
    
    This patch makes koha-plack jump into the instance's home directory to
    run.
    
    It is required because Perl 5.18 introduced a breaking change that
    makes perl die if @INC includes directories for which the user doesn't
    have read permission, and need to be traversed when querying for a lib.
    This is the case of '.', which is introduced automatically into @INC
    until Perl 5.26 (which removes the 'feature').
    
    The Mojolicious::Plugins lib prefixes the plugin names with
    'Mojolicious::Plugin' so it first looks (for example) for
    Mojolicious::Plugin::Koha::REST::Plugin::Pagination (Pagination is just
    the first one on the list). When it looks for it at '.' it dies (because
    of Perl's behaviour) so it doesn't query for the right namespace (the
    following to try).
    
    I only reproduced it in koha-testing-docker. To test, you just need to
    try this patched koha-plack and make sure it doesn't break due to this
    permissions issue.
    
    To test:
    - In your koha-testing-docker clone, run:
      $ docker-compose up -p test
    - Open a shell inside the container (on a separate terminal):
      $ docker exec -it test_koha_1 bash
    - From within the /root directory, restart plack:
      $ cd /root
      $ koha-plack --restart kohadev
    => FAIL: Logs show plack is broken due to permissions problems trying to
        find Mojolicious::Plugin::Koha::REST::Plugin::Pagination
    - Use the patched script from this patch:
      $ /kohadevbox/koha/debian/scripts/koha-plack --restart kohadev
    => SUCCESS: Plack runs fine, no error in the logs
    - Sign off :-D
    
    Note: people who has environments in which the problems is reproducible,
        please test this version of koha-plack and stamp your sign-off,
        PLEASE.
    
    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>

commit 4a90619e583be270dd4e581057a2fc30f48c4537
Author: Josef Moravec <josef.moravec at gmail.com>
Date:   Fri Mar 2 10:13:00 2018 +0000

    Bug 20323: Fix batch patron modification tool
    
    Test plan:
    1) Go to Tools -> Batch patrons modification
    2) Select some patrons and try to change any field
    --> without patch - it exploads with log:
    Can't call method "category" on unblessed reference at /home/vagrant/kohaclone/tools/modborrowers.pl
    --> with patch - the modification is properly made
    
    Signed-off-by: Roch D'Amour <roch.damour at inlibro.com>
    
    Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

commit 4f5d525d66f1436fb1a74f4fc9da3a0d17168e75
Author: Tomas Cohen Arazi <tomascohen at gmail.com>
Date:   Mon Mar 5 13:36:50 2018 -0300

    Bug 20167: Make changing a hold pass the itemnumber to ModReserve
    
    If you have an item-level hold, changing an attribute (like priority,
    pickup location or suspended until date) makes the hold a biblio-level
    hold, because ModReserve is not passed the current itemnumber.
    
    This patch uses the hold's itemnumber and passes it to the ModReserve
    call.
    
    To test:
    - Run the regression tests from the previous patch:
      $ kshell
     k$ prove t/db_dependent/api/v1/holds.t
    => FAIL: Tests fail
    - Apply this patch
    - Run the tests:
      $ kshell
     k$ prove t/db_dependent/api/v1/holds.t
    => SUCCESS: Tests pass!
    - Sign off :-D
    
    Signed-off-by: Claire Gravely <claire.gravely at bsz-bw.de>
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

commit 00374d0741b5c94ccdbbbc36164d4ef099ab3e2c
Author: Tomas Cohen Arazi <tomascohen at gmail.com>
Date:   Mon Mar 5 13:35:33 2018 -0300

    Bug 20167: Regression test
    
    Signed-off-by: Claire Gravely <claire.gravely at bsz-bw.de>
    
    Signed-off-by: Josef Moravec <josef.moravec at gmail.com>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

commit d4e444a01db991f54a771bbca1e689f959ac066c
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>

commit 6db09ad3b070845539994ff4f1f8b9f7d6d2dfc8
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>

commit f312f83dbc14de6e31e15a36f03d5532f5396a8d
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>

commit 184541269307726d7b457ff8beb9637adcd5016b
Author: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
Date:   Wed Feb 28 12:57:25 2018 -0300

    Bug 20251: (bug 19280 follow-up) FIX SIP checkout
    
    Signed-off-by: Colin Campbell <colin.campbell at ptfs-europe.com>
    
    Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>
    
    Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

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

Summary of changes:
 C4/SIP/ILS/Patron.pm               |    2 --
 C4/SIP/ILS/Transaction/Checkout.pm |    9 +++++----
 Koha/REST/V1/Hold.pm               |    1 +
 acqui/orderreceive.pl              |    8 ++++++--
 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/scripts/koha-foreach        |   11 +++++++++++
 debian/scripts/koha-plack          |   11 ++++++++++-
 misc/cronjobs/longoverdue.pl       |    9 +++++++--
 t/db_dependent/api/v1/holds.t      |    5 +++--
 tools/modborrowers.pl              |    3 ++-
 14 files changed, 75 insertions(+), 31 deletions(-)


hooks/post-receive
-- 
main Koha release repository


More information about the koha-commits mailing list