Commit graph

729 commits

Author SHA1 Message Date
da93be46ff Bug 30511: Don't lock up entire database while running koha-dump
Test plan:
1. Apply the patch
2. Restart services
3. Run koha-dump
4. Confirm the .sql.gz and .tar.gz files are generated successfully

Sponsored-by: Catalyst IT

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-10 23:09:09 -10:00
e614c68d72 Bug 29936: Add holds_get_captured option to sip config
This patch adds a new option to the SIP config, allowing for hold
capture to be disabled on difference devices. We still notice the hold
and alert the user, but we do not trigger the update in the system to
mark the hold as found (waiting, processing or in transit).

Sponsored-by: Cheshire Libraries Shared Services
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-05 11:17:37 -10:00
f62c485bb7 Bug 28998: Add encryption_key to the config file
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-04 05:18:31 -10:00
86990f3ede Bug 10517: (QA follow-up) No need to remove second true
This is just theoretical, but by removing the second true you
could end the script on another error.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-03 11:19:50 -10:00
Rudolf Byker
e6a40fc9ed Bug 10517: Use DROP USER IF EXISTS and remove || true.
When restoring a Koha instance, and the database user does not exist, an error is shown,
although it is prevented from stopping the script by ` || true`. This patch removes the
` || true` guard, and rather uses `DROP USER IF EXISTS` which does exactly what one
would expect, without confusing error messages, whether the user existed or not.

To test:
1) Assume your Koha instance is called `asdf`.
1) Export the Koha instance using `koha-dump`.
2) Remove the instance completely using `koha-remove`.
3) Import it again using `koha-restore`.
4) No error should be shown, and the import should work. There was NO user to drop, therefore `DROP USER IF EXISTS` did nothing.
5) A database user called `koha_asdf` should exist, and have all privileges on the database of the same name.
6) Remove the instance again using `koha-remove`.
7) Now create a database user in MySQL called `koha_instance` where instance is the name of your dumped koha instance.
8) Import your koha instance again using `koha-restore`.
9) Again, no error should be shown, and the import should work. There WAS a user to drop, therefore `DROP USER IF EXISTS` dropped the user before creating a new one.
10) Again, a database user called `koha_asdf` should exist, and have all privileges on the database of the same name.

Sponsored-by: Reformational Study Centre
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-03 11:19:50 -10:00
7170874a9b Bug 26370: (QA follow-up) Add new option to templates
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:39 -10:00
631d350086 Bug 27783: (follow-up) Rename options
Why require `job_`.. it's easiery to just use 'queue' and we have 'job'
from the context of the script we're calling.  This also inproves
consistency between the debian commands and the script params.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
f1fef6527c Bug 27783: Add queue handling in packaging tools
This patch adds queue name handling in is_worker_running and a handy
method to centralize process name handling for queue-specific workers.

To test:
1. Apply this patch
2. Run:
   $ source debian/scripts/koha-functions.sh
   $ get_worker_name kohadev
   kohadev-koha-worker
=> SUCCESS: Default queue means no queue name included
   $ get_worker_name kohadev default
   kohadev-koha-worker
=> SUCCESS: Default queue means no queue name included
   $ get_worker_name kohadev long_tasks
   kohadev-koha-worker-long_tasks
=> SUCCESS: Queue name appended to the name
4. Run:
   $ perl misc4dev/cp_debian_files.pl \
              --koha_dir /kohadevbox/koha \
              --gitify /kohadevbox/gitify \
              --instance kohadev
5. Run:
   $ koha-worker --start --queue oleonard kohadev
=> SUCCESS: Starts!
6. Check:
   $ ps waux | grep oleonard
=> SUCCESS: It is running
7. Play with --stop, --restart, --status and different queue names,
   including 'default' and without the --queue param as well.
=> SUCCESS: All as expected!
8. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
1e32b6bc44 Bug 29957: Add --keep-cookie option to koha-create
As requested on comment99. Personally I do not feel that it
should be a requirement for adding a koha-conf entry though.
Note that koha-create does/did not even support adding multiple
line entries to koha-conf like we do here now.
But it might be a start for adding them?

Test plan:
The following tweak might help you to test without running the
complete koha-create, while still convincing you:

[1] cp debian/templates/koha-conf-site.xml.in /etc/koha/test.conf
[2] Add the following line in debian/scripts/koha-create. Append
    if after the BCRYPT_SETTINGS= line on L652:
    generate_config_file test.conf test.xml; exit
[3] Run debian/scripts/koha-create --keep-cookie A
[4] Check if you see <do_not_remove_cookie>A<..> in test.xml.
[5] Run debian/scripts/koha-create --keep-cookie A --keep-cookie B
[6] Check for two lines in test.xml
[7] Run debian/scripts/koha-create clone_name
[8] Check that the __KEEP_COOKIE__ line is gone in test.xml.
[9] Undo the tweak by removing test.xml and /etc/koha/test.conf,
    and removing the added line from koha-create.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-12 11:40:17 +02:00
bc75c5acf2 Bug 29957: Add example lines in koha-conf.xml
Test plan:
Just comments. Nothing to test.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: using new name for deny list.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-12 11:40:17 +02:00
ed03af124d Bug 26685: Move starman out of debian/control.in and into cpanfile
to test...
 - apply patch
 - build and install new package
 - confirm starman package displays correctly in about.pl page

Signed-off-by: Mason James <mtj@kohaaloha.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-22 10:17:34 -10:00
e550f657f1 Bug 19532: (QA follow-up) Add the cron jobs to the cron files
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-14 22:45:52 -10:00
2c5f49550b Bug 30209: Upgrade 'libdbd-sqlite2-perl' package to 'libdbd-sqlite3-perl'
to test...

1/ apply patch, build and install new package

2/ check that libdbd-sqlite3-perl package is installed

     $ dpkg -l | grep libdbd-sqlite
     ii  libdbd-sqlite3-perl:amd64              1.62-3          amd64

    note: libdbd-sqlite3-perl package installs DBD::SQLite module, which uses sqlite3 :)

        https://packages.debian.org/stretch/libdbd-sqlite3-perl
        https://metacpan.org/pod/DBD::SQLite

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-09 18:35:38 -10:00
dfa2f4b436 Bug 30084: Remove explicit dependency of liblocale-codes-perl
1/ apply patch

2/ build and install new koha-common package

=> Package liblocale-codes-perl is not installed, Koha does not need it

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Mason James <mtj@kohaaloha.com>

JD amended patch: fix commit message
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-21 15:15:47 -10:00
80e7f7dae6 Bug 29881: libdbd-sqlite2-perl is unavailable on deb12 (koha-common wont install)
to test...

- attempt to install koha-common pkg on deb12

  confirm error...
   The following packages have unmet dependencies:
   koha-common : Depends: libdbd-sqlite2-perl but it is not installable

- apply patch, rebuild new package

- install new koha-common pkg on deb12 successfully

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-09 15:36:24 -10:00
c200bf6bc9 Bug 28962: Add del-unv-selfreg to crontab
We also add a test by inserting a simulated borrower modification
record in the same table which should not be deleted.

NOTE: This patch fixes the del-unv-selfreg parameter in the
cleanup db script. It did not even do what it promised :)

Test plan:
Verify if the crontab change is correct.
Run t/db_dependent/Members.t

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

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-01-21 21:34:51 -10:00
08c03af2ae Bug 18984: Remove NORMARC support
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-07 15:36:40 +02:00
90be2877c9 Bug 28730: (QA follow-up) Add new option to example configs
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-10-07 11:18:29 +02:00
Jason Boyer
da7177f536 Bug 28749: Restore the database name to Koha dumps
The line to use the --databases flag with mysqldump by default was accidentally
removed from koha-dump when the --schema-only option was added. This makes all
backups act as if koha-dump is called with the --without-db-name flag, causing
koha-restore to fail to restore the database because it's neither CREATEd or USEd.

This patch restores that line

To test:
1 - sudo debian/scripts/koha-dump kohadev
2 - zcat /var/spool/koha/kohadev/kohadev-2021-07-28.sql.gz | grep DATABASE
3 - Notice no output
4 - Apply patch
5 - sudo debian/scripts/koha-dump kohadev
6 - zcat /var/spool/koha/kohadev/kohadev-2021-07-28.sql.gz | grep DATABASE
7 - You get the line:
    CREATE DATABASE /*!32312 IF NOT EXISTS*/ `koha_kohadev` /*!40100 DEFAULT CHARACTER SET latin1 */;

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-07-30 15:54:05 +02:00
601a969915 Bug 25464: Adjust occurrence in debian/koha-core.postinst
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-07-26 12:46:32 +02:00
006c70f4f2 Bug 25464: Add ability to specify client IP and SIP account used in SIP2 logging
Bug 15253 originally had the ability to specify the incoming IP address used for
a given log statement via SIP, as well as the SIP2 account that was in use at the time.
This data is very helpful for debugging purposes, and should be brought back.

Test Plan:
1) Apply this patch
2) Update you SIP ConversionPattern to "[%d] [%p] %X{accountid}@%X{peeraddr}: %m %l %n"
3) Restart SIP
4) Use the SIP cli tester to make some SIP requests
5) View the SIP2 log, note the account id and client ip address show in the log!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-07-26 12:46:32 +02:00
9eee9f931d Bug 28620: Remove trailing space when logging with log4perl
Trivial change.
Do sed -i -r -e'/log4perl/ s/\s%n$/%n/' on the log4perl configs.

Test plan:
Update your own config.
Trigger some logging and check that logfile.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-07-26 11:17:46 +02:00
4c79fe761b Bug 27348: Fix test on ALTERNATE_INDEXER_DAEMON in koha-indexer
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-06-21 12:07:28 +02:00
44ef424308 Bug 27348: Fix test on INDEXER_PARAMS in koha-indexer
koha-indexer doesn't test INDEXER_PARAMS correctly which causes errors
to display when stopping/starting the daemon.

This patch fixes the test so that the variable is tested as a string,
so that no errors are created and the params are passed correctly.

Test plan:
0. Apply patch
1. vi /etc/default/koha-common
2. Add the following to the bottom of the file:
INDEXER_PARAMS="-daemon -sleep 6"
3. cp debian/scripts/koha-indexer /usr/sbin/koha-indexer
4. koha-indexer --stop kohadev
5. Note no errors
6. koha-indexer --start kohadev
7. Note no errors
8. ps -efww | grep "indexer"
9. Note that rebuild_zebra.pl has the arguments "-daemon -sleep 6"

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-06-21 12:07:28 +02:00
e917b5788c Bug 28519: Add lib to koha-shell
Test plan:
% koha-shell kohadev -c 'echo $PERL5LIB'
=> /kohadevbox/koha:/kohadevbox/koha/lib

% koha-shell kohadev
echo $PERL5LIB
=> /kohadevbox/koha:/kohadevbox/koha/lib:/kohadevbox/qa-test-tools

Note that this is not consistent but at least we have lib now in both
situations

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-06-17 15:59:40 +02:00
40089a0a53 Bug 28519: Put CGI::Session::Serialize::yamlxs in lib directory
This patch adds a "lib" directory to the source tree which gets
mapped to the same directory as "C4" and "Koha" for single and
standard installations.

CGI::Session::Serialize::yamlxs is put into this "lib" directory.

This patch also includes some changes so that dev/git installations
work as well.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-06-17 10:07:36 +02:00
79fe1a6ab9 Bug 28364: Make log4perl.conf belong to the instance user
This patch makes koha-create generate the log4perl.conf file for the
instance, belonging to the instance user. This is done in order to have
the z3950 responder work.

My original idea was to make the responder accept a '-g' parameter but
that is not supported by Net::Z3950::Responder. Also, as the library
insists on handling the PID file on its own, it wont' work to handle the
responsability to start-stop-daemon. The only solution I found was
making the fiel be owned by the instance user.

1. Create a Koha instance:
   $ koha-create --create-db test
2. Initiate all the things
3. Enable and start the z3950 responder
   $ koha-z3950-responder --enable test
   $ koha-z3950-responder --start test
4. Try doing some search:
   $ yaz-client localhost:2100
=> FAIL: you get:
Connecting...OK.
Sent initrequest.
Target closed connection
Z> quit
See you later, alligator.
=> FAIL: No warning or anything on the logs
5. Stop the daemon
   $ koha-z3950-responder --stop test
6. Run it manually:
   $ PERL5LIB=/usr/share/koha/lib KOHA_CONF=/etc/koha/sites/test/koha-conf.xml \
              /usr/bin/perl /usr/share/koha/bin/z3950_responder.pl \
              -c /etc/koha/sites/test/z3950 -u test-koha \
              -p /var/run/koha/test/z3950-responder.pid -d test-koha-z3950
7. Repeat the 4, on a separate terminal (no daemon mode this time)
=> FAIL: You get:
Cannot open /etc/koha/sites/test/log4perl.conf (Permission denied) at /usr/share/perl5/Log/Log4perl/Config/BaseConfigurator.pm line 51.
8. Change the file owner:
   $ chown test-koha /etc/koha/sites/test/log4perl.conf
9. Repeat 6, and 4
=> SUCCESS: It doesn't break anymore!
10. Apply this patch
11. Create a new instance, with the patched koha-create:
    $ debian/scripts/koha-create --create-db test1
12: Check the generated files permissions:
    $ ls -l /etc/koha/sites/test2
=> SUCCESS: You get:
-rw-r----- 1 root       test2-koha 19720 May 17 13:26 koha-conf.xml
-rw-r----- 1 test2-koha test2-koha  2825 May 17 13:26 log4perl.conf
-rw-r----- 1 root       test2-koha  2014 May 17 13:26 zebra-authorities-dom.cfg
-rw-r----- 1 root       test2-koha  2279 May 17 13:26 zebra-biblios-dom.cfg
-rw-r----- 1 root       test2-koha    26 May 17 13:26 zebra.passwd

13. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-05-27 17:17:30 +02:00
2353700921 Bug 28158: Allow batchMod to run under plack
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-05-27 14:12:24 +02:00
421fdc3d8f Bug 28302: Update packages to ignore CGI::Compile 0.24 (2)
to test...
 1/ build package
 2/ install package on focal
 3/ check that libcgi-compile-perl 0.24 is not installed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-05-20 17:08:04 +02:00
3faeb90126 Bug 28302: Update packages to ignore CGI::Compile 0.24
to test...
 1/ build package
 2/ install package on focal
 3/ check that libcgi-compile-perl 0.24 is not installed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-05-20 08:40:10 +02:00
25b1ada137 Bug 27844: Launch koha-worker systemd service as koha linux user
This patch adds the User directive to the koha-worker systemd unit file

Test plan:
0a. DO NOT APPLY PATCH YET
0b. Start a Koha testing environment running systemd
1. koha-worker --stop kohadev
2. cp debian/templates/koha-worker@.service /etc/systemd/system/.
3. systemctl start koha-worker@kohadev.service
4. ps -efww | grep "background_jobs_worker"
5. Note koha-worker is running as root
6. APPLY THE PATCH
7. cp debian/templates/koha-worker@.service /etc/systemd/system/.
8. systemctl daemon-reload
9. systemctl restart koha-worker@kohadev.service
10. ps -efww | grep "background_jobs_worker"
11. Note that koha-worker is now running as kohadev-koha

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-05-17 12:34:33 +02:00
4d379cf698 Bug 23207: (QA follow-up) Add to cron files
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 11:11:05 +02:00
Agustin Moyano
7439579b8b Bug 23207: Add automatic checkin feature
This patch adds the posibility to set an itemtype with automatic
checkin. It means that when the checkout is due, it will
automatically check in.

To test:
1. apply patches
2. updatedatabase
3. go to koha administration -> item types and edin an item type (from
   now on called itemtype1)
CHECK => there is a checkbox almost at the end called automatic checkin
4. check that checkbox and save
5. checkout 2 items from itemtype1 and one item from another itemtype
   (from now on called itemtype2)
6. go to mysql database console (koha-mysql) and manually set date_due = current_timestamp
   in issues table for the item of itemtype2 and only one of the items of
itemtype1
7. run cronjob at misc/cronjobs/automatic_checkin.pl
8. go to mysql database console again and select * from issues
SUCCESS => All issues are present except for the issue of itemtype1
which had it's date_due set to current_timestamp. That one was
automatically checked in.
9. prove t/db_dependent/Koha/Checkouts.t

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Hasina Akhter <HasinaA@pascolibraries.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 11:11:05 +02:00
e07c9e9f06 Bug 14300: Add %P to SIP LogPattern
This patch adds `%P` to the SIP log4perl configuration so that PID is
recorded against log lines.

This allows transactions to be more easily tied together under one
SIPServer, thus making it easier to pick out a whole transaction from
start to finish.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00
65542edbe0 Bug 27839: (follow-up) Update docs for koha-worker
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-12 15:27:50 +02:00
90291914f9 Bug 27839: Add tab-completion in bash for koha-worker
This patch simply adds tab-completion for this script.

To test:
1. Apply this patch
2. Run:
   $ cp debian/koha-common.bash-completion  /etc/bash_completion.d/koha-common
3. Open a new bash instance
4. Type 'koha-worker <tab>'
=> SUCCESS: All options are there
5. Play with Koha instances
=> SUCCESS: they show up, once chosen they are not offered anymore
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-12 15:27:50 +02:00
2cd4c6011a Bug 25674: Remove default vhost
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 12:27:23 +01:00
476ab4758c Bug 25674: Add documentation
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 12:27:23 +01:00
ac5f628559 Bug 25674: Adapt koha-create
This patch adds the following option switches to koha-create:

--mb-host
--mb-port
--mb-user
--mb-pass
--mb-vhost

They are used to override the default values on instance creation.

To test:
1. Play with the several option switches and verify that the resulting
   koha-conf.xml contains the expected data.
=> SUCCESS: It works as expected
2. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 12:27:23 +01:00
ce11b59ce1 Bug 25674: Add placeholders for RabbitMQ configuration
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 12:27:22 +01:00
8663f23a93 Bug 26742: Add configuration to koha-conf.xml for message broker
The connection details for the message broker should be configurable.
This patch adds configuration options to koha-conf.xml. If they
are not specified, then default connection details will be used.

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 12:27:22 +01:00
592ab10fe5 Bug 22824: Remove C4::Boolean, true_p, boolean_preference, etc.
It seems that we don't really need all this overhead.
YesNo must be a boolean and contain 1 or 0.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
bf06f36fd0 Bug 26363: Remove tmp file during package build (follow-up)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 08:44:52 +01:00
782ae18779 Bug 26363: Change SyslogIdentifier to match koha-worker script style
This patch changes the SyslogIdentifier so that it matches
the style used by koha-worker.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 10:51:15 +01:00
6e21b86f66 Bug 26363: Provide a systemd unit file for koha-worker in package installs
While the packages already have a koha-zebra script that creates a service
using the 'daemon' utility, this unit file template provides an alternative.

Note that currently you'd have to start the service using the following:

```systemctl start koha-worker@NAME.service```

Where NAME is the name of your Koha instance.

The systemctl enable/start commands could be automated more with helper
scripts in debian/scripts, but this is a first step.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 10:51:15 +01:00
06a58fe56d Bug 20410: Remove OpacGroupResults and PazPar2
This feature is not used as far as we know and it's not known to work.
It's preferable to remove it.

Test plan:
Make sure the OpacGroupResults pref code is removed, as well as the
PazPar2 files and code.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 16:12:42 +01:00
9fdceaa3b5 Bug 26048: Use ErrorDocument middleware for Plack HTTP errors
This patch uses the ErrorDocument middleware to use Koha's
custom error pages instead of generic Plack error responses

Test plan:
0. Apply patch
1. vi /usr/sbin/koha-plack (and change "development" to "deployment")
2. vi ./opac/opac-main.pl
3. Add "die" to line 2
4. vi ./mainpage.pl
5. Add "die" to line 2
6. cp ./debian/templates/plack.psgi /etc/koha/sites/kohadev/plack.psgi
7. koha-plack --restart kohadev
8. Go to http://localhost:8080/cgi-bin/koha/opac-main.pl
9. See a beautiful OPAC 500 error instead of "Internal Server Error"
10. Go to http://localhost:8080/cgi-bin/koha/blah.pl
11. See a beautiful OPAC 404 error instead of "not found"
12. Go to http://localhost:8081/cgi-bin/koha/mainpage.pl
13. See a beautiful Staff interface 500 error instead of "Internal Server Error"
14. Go to http://localhost:8081/cgi-bin/koha/blah.pl
15. See a beautiful Staff interface 404 error instead of "not found"

For bonus points:
16. koha-plack --disable kohadev
17. koha-plack --stop kohadev
18. service apache restart
19. Repeat the above test plan to show CGI still works for 404 (although 500
will show "Software Error" due to C4::Context needing some improvements)
20. Using the "Network" tab on your developer tools, make sure 404 and 500
are returned by the appropriate error pages

Signed-off-by: Eden Bacani <eden.bacani@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-27 10:30:43 +01:00
1ce9e0160c Bug 25245: Add plugins_nightly.pl to the default cron
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-20 13:49:55 +01:00
Andreas Roussos
920d3efcdf Bug 17429: document the --plack/--noplack options of koha-list
The man page of koha-list does not list the --plack and --noplack
options.

This patch fixes that.

Test plan:

1) View the current man page for `koha-list` (with `man koha-list`)
   and notice how the --plack and --noplack options are missing.

2) Apply this patch.

3) Run the following command to re-generate the man page:

   xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
   debian/docs/koha-list.xml

   View the manual page again (with `man -l koha-list.8`), the
   two options are now displayed under SYNOPSIS and OPTIONS.

4) Make sure this test passes:
   prove -v xt/verify-debian-docbook.t

Signed-off-by: Mazen Khallaf <mazen.i.khallaf@gamil.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-19 16:03:34 +01:00
4253eb91a6 Bug 26947: Remove AUTO_INCREMENT
Sending a cake there
https://bugs.mysql.com/bug.php?id=20786

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-12 12:31:58 +01:00