Commit Graph

879 Commits

Author SHA1 Message Date
Andreas Roussos a45a642f35
Bug 41337: Add missing Bash variable to `koha-create`
When creating a new Koha instance using the two-step workflow
(`koha-create --request-db <instance>`, followed by
`koha-create --populate-db <instance>`), some log files under
/var/log/koha/<instance>/ end up with incorrect ownership.

Specifically, intranet-error.log and opac-error.log are owned
by root:root instead of <instance>-koha:<instance>-koha.

This patch fixes that.

Test plan (tailored for KTD):

1) Before applying this patch, run the following commands
   inside your KTD Koha container:

   $ sudo koha-create --request-db test1
   $ SQLPASS=`sudo grep password: test1-db-request.txt | cut -c 16-`
   $ mysql -hdb -uroot -ppassword -e "CREATE DATABASE koha_test1;"
   $ mysql -hdb -uroot -ppassword -e "GRANT ALL PRIVILEGES ON koha_test1.* TO 'koha_test1'@'%' IDENTIFIED BY '${SQLPASS}';"
   $ mysql -hdb -uroot -ppassword -e "FLUSH PRIVILEGES;"
   $ sudo koha-create --populate-db test1

   $ ls -l /var/log/koha/test1/
     total 8
     -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:35 indexer-error.log
     -rw-r--r-- 1 test1-koha test1-koha 1278 Feb  9 15:35 indexer-output.log
     -rw-r--r-- 1 root       root          0 Feb  9 15:35 intranet-error.log
     -rw-r--r-- 1 root       root          0 Feb  9 15:35 opac-error.log
     -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:35 worker-error.log
     -rw-r--r-- 1 test1-koha test1-koha 1828 Feb  9 15:35 worker-output.log
     -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:35 zebra-error.log
     -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:35 zebra-output.log

   Notice the incorrect user/group ownership on two
   files: `intranet-error.log` and `opac-error.log`.

2) Apply this patch, remove the `test1` instance along
   with the database request text file, and copy the
   modified script to its system-wide location:

   $ sudo koha-remove test1
   $ sudo rm test1-db-request.txt
   $ sudo cp debian/scripts/koha-create /usr/sbin/koha-create

3) Repeat the commands in Step 1. This time, the output of
   the last command should resemble the following:

   total 8
   -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:42 indexer-error.log
   -rw-r--r-- 1 test1-koha test1-koha 1520 Feb  9 15:42 indexer-output.log
   -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:42 intranet-error.log
   -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:42 opac-error.log
   -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:42 worker-error.log
   -rw-r--r-- 1 test1-koha test1-koha 1828 Feb  9 15:42 worker-output.log
   -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:42 zebra-error.log
   -rw-r--r-- 1 test1-koha test1-koha    0 Feb  9 15:42 zebra-output.log

   All files should now have the correct user/group ownership.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7ee861e256)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2026-07-17 13:01:58 +12:00
Kyle M Hall 91f9d780e3
Bug 39164: (QA follow-up) Add setting to koha conf files
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
2026-06-19 12:47:43 +12:00
Tomás Cohen Arazi 4351b52ab7
Bug 40163: (follow-up) Fix wrong GNU links and update test
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
2026-01-07 14:32:37 +00:00
Tomás Cohen Arazi 029911427b
Bug 40163: (follow-up) Fix Bugzilla URL
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
2026-01-07 14:32:36 +00:00
Tomas Cohen Arazi 1cf93e5f97
Bug 40163: Fix several http addresses in the code docs
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
2026-01-07 14:32:30 +00:00
Tomás Cohen Arazi 420fb7148a
Bug 41032: Fix Open Fifth missing in plugin repos config
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit cee02bbf3b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-12-01 15:53:27 +01:00
Tomás Cohen Arazi 9e2eafec0e
Bug 40812: Move Theke sample plugin repo to GitHub
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 18ff4d4933)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-09-25 16:22:44 +02:00
Marcel de Rooy f09fe9e56c
Bug 39906: (QA follow-up) Feature needs to be enabled specifically
See also comment33, point 4.

Test plan:
cp debian/templates/apache-shared-opac-antibot.conf /etc/koha/
Test enabling/disabling by toggling the comment of the SetEnvIf line,
restart apache and remove the KOHA_INIT and CGISESSID cookie.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-08-26 21:05:12 +02:00
David Cook 89cb4ef77b
Bug 39906: Add a simple quick Apache-level bot challenge
This patch adds a fast simple bot challenge via Apache.

To test:
0. Apply the patch
1. sudo cp debian/templates/apache-shared-opac-antibot.conf /etc/koha/.
2. sudo cp debian/templates/apache-shared-opac-plack.conf /etc/koha/.
3. curl http://localhost:8080/cgi-bin/koha/opac-search.pl
4. Note an instant response with a very simple HTML response
5. Open an incognito browser and go to http://localhost:8080/cgi-bin/koha/opac-search.pl
6. Note a very brief loading animation before the OPAC search page appearing
7. Do a search
8. Note no more loading animation appears
9. Close the incognito browser
10. Open an incognito browser and go to http://localhost:8080/cgi-bin/koha/opac-main.pl
11. Do a search via the "Library catalog" search bar
12. Note no loading animation appears

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Cornelius Hertfelder <cornelius.hertfelder@bsz-bw.de>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
We have tested this in production on at least three live sites for
several weeks, and it has worked as expected. We have not noticed any
negative side effects.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-08-26 21:05:08 +02:00
Jake Deery 3cc750d5ad
Bug 40304: Zebrasrv configs now work on ARM CPUs
This patch adds more module search paths to the zebra-biblios-dom.cfg and zebra-authorities-dom.cfg, so that a larger range of CPU architectures will work with Zebra search unit tests.

This will not change Debian package installs, but it will fix any git-based installs.

TO TEST (you'll need access to an ARM-based CPU, and, preferably, an x86-64 machine):
ON THE ARM-BASED MACHINE:
a)  start ktd, then ktd --shell
b)  in ktd, run: prove -v t/db_dependent/Search.t
c)  notice how the test now fails
APPLY PATCH
d)  rerun step b
e)  notice how the test now passes
ON THE X86-64-BASED MACHINE:
f)  run steps a-e
g)  notice how the test passes, both before and after applying the patch
SIGN OFF

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3a6ac8c843)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-07-24 10:23:34 +02:00
Jonathan Druart c336f23cd0
Bug 39876: Make build-git-snapshot pass codespell
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f0b4bd4fa2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-07-10 22:47:36 +02:00
Tomas Cohen Arazi 091d002636
Bug 40164: (follow-up) Update debian/control
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b5a077425e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-07-10 22:47:33 +02:00
Tomas Cohen Arazi 61b3019600
Bug 40261: Tidy debian/build-git-snapshot
Signed-off-by: David Flater <flaterdavid@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dc11fbdc5b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-07-10 22:47:28 +02:00
Mason James 14662a012e
Bug 40039: Add production enhancements to build-git-snapshot tool
this patch adds some useful features to allow the build-git-snapshot tool to build production packages

the patch adds the following options:

     --urgency, -u
        the urgency string for the resulting package. Default is '$urgency'.

    --incr, -i
        set debian revision (default = '-1')

    --(no)autochangelog
        whether or not to update the debian/changelog file.
        Default is to update it.

note: this patch does not change any of the existing behaviour of the tool

test plan to come...

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3e7c839714)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-07-10 22:47:18 +02:00
Marcel de Rooy 37e9b0031f
Bug 39206: Modify koha-conf templates
Test plan:
Just read the patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5493e212f6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-07-10 22:47:10 +02:00
Tomas Cohen Arazi 79f69e7e4c
Bug 39961: (follow-up) Make `koha-disable` stop all queues
This patch applies the same logic to `koha-disable`.

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d2ffae92a7)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:39 +02:00
Tomas Cohen Arazi 5a6ad66117
Bug 39961: Make `koha-create` start all queues
Taking advantage of the `get_worker_queues` function introduced in bug
31124, this patch makes `koha-create` start all defined queues.

To test:
1. Run:
   $ ktd --shell
  k$ sudo -s
  k$ koha-create --create-db test
=> FAIL: No mention of `long_tasks`
2. Apply 31124 and then this patch
3. Run:
  k$ cp debian/scripts/koha-functions.sh \
        /usr/share/koha/bin/koha-functions.sh
  k$ debian/scripts/koha-create --create-db test1
=> SUCCESS: `long_tasks` worker is started
4. Sign off :-D

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 45089704fa)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:38 +02:00
Tomas Cohen Arazi 86fd02bd1a
Bug 31124: Make koha-remove stop all workers
This patch makes two things:

* Adds a `get_worker_queues` function to koha-functions.sh
* Makes `koha-remove` loop through all the defined queues to stop all
  the running workers before trying to remove the unix user for the
  instance.

To test:
1. Run:
   $ ktd --shell
  k$ sudo -s
  k$ koha-create --create-db test1
  k$ service koha-common restart
  k$ koha-remove test1
=> FAIL: There's an error about not being able to drop the instance user
2. Run:
  k$ ps -ef | grep test1
=> FAIL: There's a running process for the 'long_tasks' queue worker.
3. Apply this patch
4. Run:
  k$ cp debian/scripts/koha-functions.sh \
        /usr/share/koha/bin/koha-functions.sh
5. Repeat 1 naming the instance `test2`
=> SUCCESS: The instance is removed correctly. No error about running
processes
=> SUCCESS: No process is running for `test2`
6. Sign off :-D

Signed-off-by: Magnus Enger <magnus@libriotech.no>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 576c496442)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
2025-06-22 23:48:38 +02:00
Matt Blenkinsop 8e17c636ef
Bug 38010: (QA follow-up) Add new apache redirect
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:18 +02:00
Matt Blenkinsop 8f93413671
Bug 38010: (QA follow-up) Update routes to include 'acquisition'
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:19:09 +02:00
Matt Blenkinsop b71b62059a
Bug 38010: Add vue app and list component
This patch adds the base vue app as well as the component to list vendors

Amended-by: Jonathan Druart
chmod 755 acqui/vendors.pl

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-05-02 17:18:27 +02:00
Jonathan Druart 043009250a
Bug 39367: Add new dependency
Nothing to do here, libpod-coverage-perl 0.23 is available in all debian
versions

Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-23 09:35:16 +02:00
Lukas Koszyk 42ec5d36c2
Bug 38760: Add support for database connection encryption parameters in koha-mysql
The koha-mysql didn't work when the instance was set up to use an encrypted
database connection.

Please note: this testplan is for ktd, not for a production environment!

Unfortunately, there are some issues with the database TLS configuration in koha-testing-docker.
This is described comment 14 of bug 36026 (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36026#c14)

As a workaround, you can add "mysql_ssl_optional=1" in Koha/Database.pm.
See point (g) in comment 15 of bug 36026 (https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36026#c15)

Testing Database Connection Encryption:
1. Apply the patch.
2. Configure koha-conf.xml to use a TLS connection
(see comment 10 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36026#c10, follow steps 3a-g + 4 )
3. Run:
koha-mysql <koha_instance>
4. Verify that the MySQL console opens successfully.
5. Check the encryption settings in the MySQL console:
- run:
SHOW VARIABLES LIKE '%ssl%';
- run:
STATUS;
Ensure that the following conditions are met:
- have_openssl and have_ssl are set to "YES".
- The SSL cipher in use is displayed.

Testing MySQL Timezone Configuration:
1. Apply the patch.
2. Configure the timezone in koha-conf.xml, for example:
<timezone>Antarctica/South_Pole</timezone>
3. Run:
koha-mysql <koha_instance>
4. Verify that the MySQL console opens successfully.
5. Check the timezone setting in the MySQL console by running:
SELECT @@session.time_zone;
6. Confirm that the output matches the timezone configured in koha-conf.xml.

Sponsored-by: Karlsruhe Institute of Technology (KIT)
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-22 08:46:34 +02:00
David Cook ef4d0aa5c5
Bug 39460: Fix koha-upgrade-schema when no DB change needed
This patch fixes koha-upgrade-schema so that it returns an exit
code of 0 whether or not a DB change is needed. This is important
so that koha-common.postinst proceeds correctly even when there
is no DB change needed (e.g. for 24.11.03-2)

Test plan:
0. Apply the patch
1. cp debian/scripts/koha-upgrade-schema /usr/sbin/koha-upgrade-schema
2. dpkg-reconfigure koha-common
3. Note the process completes correctly
4. koha-upgrade-schema kohadev
5. Note following text appears very quickly:
Upgrading database schema for kohadev
No database change required
6. koha-mysql kohadev
update systempreferences set value = '24.1102000' where variable = 'Version';
7. Clear memcached
8. koha-upgrade-schema kohadev
9. Note that it applies the 24.11.03 database upgrade

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-04-04 09:21:58 +02:00
Katrin Fischer 34b2d02eed
Bug 38944: Update debian/control
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-13 17:25:07 +01:00
Marcel de Rooy 2d93ec69bd
Bug 39250: Add archive_purchase_suggestions.pl to cron.daily commented
It will be a commented line in the debian template and added also
in the crontab.example file.
As mentioned on BZ, the comment can easily be removed automatically
during Docker builds or startups etc.

Test plan:
Just read the patch. Nothing changes here actually.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-07 15:41:17 +01:00
Marcel de Rooy cc60af873b
Bug 36932: Add development parameter to koha-plack
Test plan:
NOTE: Needs dev_install or ktd.

[1] Add a die in a script somewhere to simulate a crash.
    For example in opac-main.pl: die "Line 43";
[2] Run koha-plack --restart YOUR_CLONE (without -dev) and hit that page.
    See no dev output?
[3] Run koha-plack --restart -dev YOUR_CLONE and hit page again.
    See dev output?
[4] BONUS: Do a koha-plack --reload YOUR_CLONE (without -dev). Hit page.
    Verify that environment did not change.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-03-07 15:41:16 +01:00
Marcel de Rooy cd4860fb59
Bug 36954: (follow-up) Return to the two logfiles pattern
Note that --errlog should refer to all output from the wrapper daemon
process only like respawning processes etc.
And that --output should refer to all output from the daemonized
client process (so in our case the SIP server).

Moving a few sip.log occurrences to sip-output in that regard.

Test plan:
Restart koha-sip.
Login to sip server.
Restart koha-sip.
Verify that you see Net::Server messages and traces from the login in the
-output log. The restarts are not found however in -error. See my comment
on the BZ report.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-18 10:55:27 +01:00
Marcel de Rooy 235c31e683
Bug 36954: Adjust logfiles in koha-sip
No need for three files here (and badly specified).
We can just use sip.log.

Test plan:
Run koha-sip and verify that logging is still done as expected.

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@bsz-bw.de>
2025-02-18 10:55:27 +01:00
Katrin Fischer 93eda45a9e
Update debian/control
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-02-11 14:58:29 +01:00
Imani Thomas 814e1326b7
Bug 36229: Move koha-run-backups to the top of the cron
test plan:
    1. check run order of scripts in the cron
    2. apply patch
    3. koha-run-backups is now at the beginning of the cron

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 19:19:31 +01:00
Martin Renvoize 0f3511eaec
Bug 22415: Add new log config for EDI
This patch adds the Log4perl configurations required to match the
existing prior use of Log4perl in EDI code.

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-10 19:19:13 +01:00
Mason James d5ba5c2879
Bug 33018: debian package tidy-up
this patch removes unneeded package dependencies

to test:
 - apply patch
 - build and install koha-common package, note success

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Not tested, I trust Mason to the right thing.
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-12-20 18:33:22 +01:00
David Cook d95337ac55
Bug 34088: (follow-up) fix env vars in koha-upgrade-schema
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-11-13 17:00:49 +01:00
Tomas Cohen Arazi 85239f0fbf
Bug 38249: Fix typo in koha-list --help
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-24 13:38:11 +02:00
Magnus Enger 0c23b98782
Bug 38173: Fix description of koha-dump --exclude-indexes
To test:
- Look at debian/scripts/koha-dump
- The description of --exclude-indexes reads:
  "Include Zebra indexes on the backup"
- Apply the patch
- Look at the file again. The description is now:
  "Exclude Zebra indexes from the backup"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-23 19:14:57 +02:00
Magnus Enger dba23e4da1
Bug 37787: Undocument koha-worker --queue elastic_index
To test:
- Copy the koha-worker script to the standard location:
  $ sudo cp debian/scripts/koha-worker /usr/sbin/koha-worker
- Check "sudo koha-worker --help" and verify elastic_index is
  not mentioned in the list of "current queues"
- See https://wiki.koha-community.org/wiki/Testing_man_pages for
  how to check the "man" page. elastic_index should not be
  mentioned in the list of "Current queues".
- Both places aboce should have a note about elastic_index not
  being active when koha-es-indexer is running.

Signed-off-by: Sukhmandeep Benipal <sukhmandeep.benipal@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-23 19:14:55 +02:00
Aleisha Amohia 0119429ac5
Bug 36435: Catch harmless errors in koha-dump
tar has exit status 1 if any file has changed while being read, which is likely to happen as the logfiles are included. this patch will catch these harmless errors so that koha-dump will still return a success code.

Test plan:
1. Create a number of backups and edit their modify time to being older than 2 days
2. run the koha-run-backups script and try and write to one of the files it includes while it's being backed up (you'll trigger a warning from tar saying the file changed as it was being read)
3. verify that the older backups are not being cleaned up and deleted despite new backups being made.
4. Apply this patch
5. Complete steps 1-2 again and then go and look to see if the older backups are being deleted.

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Co-authored-by: Michał Kula <148193449+mkibp@users.noreply.github.com>
Signed-off-by: Michał Kula <148193449+mkibp@users.noreply.github.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-10-11 11:13:49 +02:00
Jonathan Druart e8170909f4
Bug 38035: Exclude "sound" from the list of installed languages
Not sure how this is coming from, neither why we have not noticed that
before, but "sound" is listed under `koha-translate --list`

It's coming from `ls koha-tmpl/intranet-tmpl/prog`

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-10-02 10:15:53 +01:00
Jonathan Druart 26de0bfaa0
Bug 34088: Move the 'needs update' test to a separate script
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-09-17 10:48:39 +02:00
David Cook 5ca20665a3
Bug 37087: Add TCP keepalive support to SIP server
This change adds the ability to enable and configure TCP keepalive
support for the SIP server using SIPconfig.xml.

For the sake of backwards compatibility, it defaults to disabled
and additional parameters default match typical kernel defaults.

Technical detail can be found in the perldoc for C4/SIP/SIPserver.pm

Test plan:
0. Apply the patch
1. koha-sip --restart kohadev
2. apt-get update && apt-get install tcpdump
3. In one window, run "tcpdump -A -n -v -i any 'port 6001'"
4. In another window, run the following:
echo -e "9300CNterm1|COterm1|CPCPL|\r" | nc 127.0.0.1 6001 -v
5. Note in tcpdump output that after the initial flood of packets,
nothing more is received

6. vi /etc/koha/sites/kohadev/SIPconfig.xml
7. In the "server-params" element, add attributes like the following:
custom_tcp_keepalive='1'
custom_tcp_keepalive_time='10'
custom_tcp_keepalive_intvl='5'
8. koha-sip --restart kohadev
9. In one window, run "tcpdump -A -n -v -i any 'port 6001'"
10. In another window, run the following:
echo -e "9300CNterm1|COterm1|CPCPL|\r" | nc 127.0.0.1 6001 -v
11. Note in tcpdump output that after the initial flood of packets,
ACK packets are sent out every 10+ seconds for the idle connection

Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-08-20 15:32:47 +02:00
Nick Clemens 3d385d0e11
Bug 29507: Speed up auto renew cronjob via parallel processing
The cron can take a very long time to run on systems with many issues.
For example, a partner with ~250k auto_renew issues is taking about 9 hours to run.

If we run that same number of issues in 5 parallel chunks
( splitting the number of issues as evenly as possible ), it could take under 2 hours.

Test Plan:
1) Generate a number of issues marked for auto_renew
2) Run the automatic_renewals.pl, use the `time` utility to track how much time it took to run
3) Set parallel_loops to 10 in auto_renew_cronjob section of config in koha-conf
4) Repeat step 2, note the improvement in speed
5) Experiment with other values

Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-05 15:48:11 +02:00
Nick Clemens edc5caf976
Bug 37056: Mount a new intranet_svc api to avoid redirects
When an unauthorized call to svc is made, we use the ErrorDocument middleware to respond with an HTML
page. The API doens't do this, it simply returns its status. We should mount the svc as its own app to avoid
the redirect to HTML for unauthorized responses

To test:
1 - Create a report
2 - Add to IntranetUserJs:
    $(document).ready(function() {
      // Your report ID
      var reportId = '492';

      // Fetch the report
      $.get('/cgi-bin/koha/svc/report?id=' + reportId, function(data) {
        console.log('Kaboom');
      });
    });
3 - Log out
4 - Attempt to login
5 - KO
6 - Apply patch
7 - Reset all (or copy the necessary changes to your plack/apache files)
8 - Generate report and update user js again
8 - Logout, login
9 - Success!

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-07-02 17:20:37 +02:00
Marcel de Rooy fd7130beca
Bug 37038: (QA follow-up) Replace \> by -gt
Note that -gt is the bash integer comparison and > is the
lexical one:
$ if [ '1' \> '09' ]; then echo true; fi
true
$ if [ '1' -gt '09' ]; then echo true; fi

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Added the dev/null redirection to suppress warn in bin/sh.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:23 +02:00
Janusz Kaczmarek bc92152e2f
Bug 37038: koha-elasticsearch creates a file named 0
After execution of koha-elasticsearch command a file named 0 remains in
the current directory.

Inside the single parentheses, the character '>' is treated as a file
redirection, not as a comparison operator.

Test plan:
==========
1. Have a test installation with Elasticsearch.  As root, perform:
   ./debian/scripts/koha-elasticsearch --rebuild kohadev
   When the command finishes, check the contents of the current
   directory (ls -ltr | tail).  You sould notice a fresh file named '0'
2. Apply the patch. Delete the file named 0.
3. Repeat p. 1.  There should be no file named 0 now.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:23 +02:00
Tomas Cohen Arazi 6caedbfc00
Bug 14565: Allow koha-run-backups to backup an instance called `demo`
We all have a `demo` instance somewhere. It is so weird that the default
script for backing up Koha has a hardcoded exclusion for instances
called like that. This patch fixes that.

To test:
1. Add a demo instance:
   $ ktd --shell
  k$ sudo koha-create --create-db demo
2. Run:
  k$ sudo debian/scripts/koha-run-backups
3. Check the backups:
  k$ ls -l /var/spool/koha/demo/
=> FAIL: No backup for the demo instance
3. Apply this patch
4. Repeat 2
=> SUCCESS: Backup made!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-28 13:49:22 +02:00
David Cook ce90d65603
Bug 33563: Add comments for Elasticsearch security config
This patch adds some commented Elasticsearch security configuration,
which shows how to use username/password with HTTPS.

Test plan:
0. Apply patch
1. cp debian/templates/koha-conf-site.xml.in /etc/koha/koha-conf-site.xml.in
2. koha-create --create-db test
3. vi /etc/koha/sites/test/koha-conf.xml
4. Note that the comments for userinfo and use_https are in the koha-conf.xml

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 11:49:58 +02:00
Marcel de Rooy 8e0d18e35a
Bug 36948: (follow-up) Add chomp to sip log4perl config
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-06-11 08:10:05 +01:00
Marcel de Rooy fcd7e884bc
Bug 36948: (follow-up) Allow IPv[46] in port config
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-06-11 08:10:01 +01:00
Marcel de Rooy c0d76f707b
Bug 36948: (follow-up) Remove log_file param, adjust caller_depth
We keep OPEN when people still use log_file or setsid.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2024-06-11 08:09:55 +01:00