Commit graph

80 commits

Author SHA1 Message Date
1f0419fd47
Bug 17379: Add a man page for koha-passwd (2)
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-11 10:10:04 -03:00
Lucio Moraes
be6955e17d
Bug 17379: Add a man page for koha-passwd
Adding a manpage for the koha-passwd utility.

To test:
1) Run these commands and look at the formatted man page:
$xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
 debian/docs/koha-passwd.xml
2)$man -l koha-passwd.8

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

Signed-off-by: Mika Smith <mikasmith@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-10-11 10:10:04 -03:00
af00fbd22b
Bug 21366: Add --reload option to koha-plack help/manual
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-08-26 15:52:06 -03:00
Marion Durand
a79500c5c5
Bug 21903: (follow-up) update documentation
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-05 11:46:37 -03: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
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
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
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
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
c2293d5c60 Bug 21111: Add --exclude-indexes to koha-run-backups
This patch adds a trivial switch so koha-run-backups can pass the
--exclude-indexes option switch to koha-dump. This way if the sysadmin
doesn't want to backup the Zebra indexes, it can be controlled by
tweaking the cron definition.

To test:
1. Apply this patch
2. Run:
   $ debian/scripts/koha-run-backups --days 2 --output /var/spool/koha
3. Notice the size of the backups:
   $ ls -lh /var/spool/koha/kohadev
4. Try the new option switch:
   $ debian/scripts/koha-run-backups \
       --exclude-indexes \
       --days 2 --output /var/spool/koha
5. Repeat 3
=> SUCCESS: Backups are smaller!
6. Sign off :-D

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

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

JD amended patch: fix --exclude_indexes vs --exclude-indexes in koha-run-backups.xml

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:34 +01:00
1a6c56f949 Bug 22417: Add debian script koha-worker
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:22:44 +02:00
59c1151618 Bug 26290: Add option forsetting default SMTP parameters in koha-conf.xml
This patch adds an entry to koha-conf.xml for setting a default SMTP
server config. 'koha-create' gets option switches for all options.

To test:
1. Use the tweaked script to crete a new instance
2. Notice it contains entries for smtp_server and they respect your
   options.
3. If you don't choose any option, it sets the current default.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-02 15:27:18 +02:00
Katrin Fischer
ed066caf58 Bug 26015: Terminology: Fix tons more staff clients to staff interfaces
This takes care of more occurences of staff client and changes it to
staff interface, including in code comments.

To test:
- I think in this case careful code review is what we look for.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-31 16:10:25 +02:00
3d519c8977 Bug 24306: (QA follow-up) Fix the XML
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-13 07:55:44 +02:00
948a7c5f74 Bug 24306: (follow-up) Add documentation for debug option
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-08-13 07:55:44 +02:00
Andreas Roussos
f0cbb2063a
Bug 25149: Fix Zebra language code for Greek
According to the list of two-letter language codes found in ISO 639-1
(https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), the correct
Zebra language option for Greek should be 'el', not 'gr'.

This patch fixes that.

Test plan:
0) Apply the patch.
1) Confirm that 'gr' has been changed to 'el' in all relevant files.
2) Create a new Koha instance using `koha-create --zebralang el testinst1`.
3) Edit /etc/koha/koha-sites.conf and set ZEBRA_LANGUAGE to 'el'. Then,
   create another Koha instance with `koha-create testinst2`.
4) Confirm that both instances created in steps 2) and 3) have picked up
   the Zebra CHR file from the /etc/koha/zebradb/lang_defs/el/ directory.
   This is done by inspecting the value of 'profilePath' in these files:
   /etc/koha/sites/testinst{1,2}/zebra-authorities-dom.cfg
   /etc/koha/sites/testinst{1,2}/zebra-biblios-dom.cfg

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-29 17:14:30 +01:00
8cd362a422
Bug 23137: Add documentation
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-29 17:02:11 +01:00
Liz Rea
87e4ecacc5
Bug 24340: allow koha-sip --disable inst
To test:

- Enable sip for your testing instance
 sudo koha-sip --enable inst
- Start sip for your testing instance
 sudo koha-sip --start inst
- Verify it is running
 ps ax |grep sip -> you should see processes
- Disable sip for your testing intance
 sudo koha-sip --disable inst
- Verify that the following has happened:
 * SIP is no longer running for your instance - no SIP processes
 * SIP Cannot be started for the instance because it is not enabled.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-12 16:09:35 +00:00
403763679a
Bug 19465: Document koha-create --elasticsearch-server option switch
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-12-23 11:29:58 +00:00
Magnus Enger
38a7e5e724
Bug 23400: Add --status to koha-indexer
koha-zebra has a nice, informative --status switch, koha-indexer
does not. This patch adds it.

To test:
- Run "sudo koha-indexer --status kohadev" - you get an error:
  "Error: invalid option switch (--status)"
- Apply this patch
- If you are on e.g. kohadevbox you need to copy koha-indexer to
  where it is actually run from:
  sudo cp debian/scripts/koha-indexer /usr/sbin/koha-indexer
- Run "sudo koha-indexer --status kohadev" again and you should
  get a nice status telling if the indexer is running or not
- Toggle the indexer on and off with koha-indexer --start/--stop
  and verify the status is telling the truth about the state of
  the indexer
- Run "sudo koha-indexer --help" and check there is a description
  of the --status option
- Have a look at debian/docs/koha-indexer.xml and verify there is
  an adequate description of the --status option.
- Run "prove -v xt/verify-debian-docbook.t" to check the structure
  of the man page in DocBook format.

PS: I tried to generate a manpage from the DocBook as described at
https://wiki.koha-community.org/wiki/Testing_man_pages
but the output did not look good for any of our DocBook files.
Not sure why.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-10-08 14:33:27 +01:00
3cfc8ae24c Bug 22238: Remove koha-*-sip scripts in favor of koha-sip
This patch removes traces from the (deprecated) koha-*-sip scripts.

To test:
- Apply the patch
- Verify no traces of koha-*-sip remain on the codebase (besides
  Release Notes, koha-common.links and the koha-sip script):
  $ cd kohaclone
  $ git grep koha-start-sip
  $ git grep koha-stop-sip
  $ git grep koha-enable-sip
=> SUCCESS: No traces!
- Create the following symlinks:
  $ sudo ln -s /usr/sbin/koha-sip  /usr/sbin/koha-start-sip
  $ sudo ln -s /usr/sbin/koha-sip  /usr/sbin/koha-stop-sip
  $ sudo ln -s /usr/sbin/koha-sip  /usr/sbin/koha-enable-sip
- Try the koha-*-zebra commands:
  $ sudo koha-stop-sip kohadev
  $ sudo koha-start-sip kohadev
  $ sudo koha-restart-sip kohadev
=> SUCCESS: They all work as expected!

- Sign off :-D!

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-11 18:30:10 +00:00
c0e6051ac5 Bug 22235: Make maintenance scripts use koha-sip instead of koha-*-sip
This patch makes all maintenance scripts use **koha-sip** instead of
the old **koha-*-sip** scripts.

To test:
- Run:
  $ perl misc4dev/cp_debian_files.pl
  $ sudo service koha-common stop
=> SUCCESS: No errors and the SIP-related sevices are stopped
  $ sudo service koha-common start
=> SUCCESS: No errors and the SIP-related services are started
  $ sudo service koha-common restart
=> SUCCESS: No erros and SIP-related services are running
  $ sudo koha-create --create-db test
  $ sudo koha-sip --enable test
  $ sudo koha-sip --start test
  $ sudo koha-disable test
=> SUCCESS: No errors, instance disabled, no SIP running for test
- Sign off :-D

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-11 18:30:10 +00:00
713f873626 Bug 18562: Add manpage for koha-sip
This patch adds the manpage for koha-sip.

To test:
- Apply this patch
- Run:
  $ kshell
 k$ prove xt/verify-debian-docbook.t
=> SUCCESS: Tests pass!
- Run:
  $ misc4dev/cp_debian_files.pl
  $ man koha-sip
=> SUCCESS: The man page shows correctly.
- Sign off :-D

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-02-11 18:30:10 +00:00
8f4c686e7c Bug 14302: (follow-up) Remove traces in koha-create
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-08-31 11:24:22 +00:00
fdb5d0ca1a Bug 20428: Make upload_tmp a more general tmp directory
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-14 10:36:39 -03:00
d90d8c9b27 Bug 20428: Add the option to specify a tmp uploads dir
This patch adds an option to the koha-conf.xml file for specifying
a temporary uploaded files directory.

The koha-create script is adjusted to handle it and a convenient option
switch is added. If ommited, it will default to
/var/lib/koha/<instance>/uploads_tmp.

koha-create-dirs is patched to create the required directory with the
right permissions.

The docs get the new parameter documented.

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

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-14 10:36:38 -03:00
896bb7ec54 Bug 20525: Add --timezone switch to koha-create
This patch adds a --timezone switch to koha-create so the timezone can
be set on creation time. It defaults to empty (i.e. using the server's
local time).

To test:
- Create an instance:
  $ sudo koha-create --create-db timezone1
=> SUCCESS: /etc/koha/sites/timezone1/koha-conf.xml contains an empty
<timezone> entry.
- Apply this patch
- Run:
  $ perl misc4dev/cp_debian_files.pl
- Create a new instance:
  $ sudo koha-create --create-db timezone2
=> SUCCESS: /etc/koha/sites/timezone2/koha-conf.xml contains an empty
<timezone> entry (i.e. the current behaviour is preserved).
- Create a new instance:
  $ sudo koha-create --create-db --timezone Your/Timezone timezone3
=> SUCCESS: /etc/koha/sites/timezone3/koha-conf.xml contains
    <timezone>Your/Timezone</timezone> (i.e. introduced behaviour works)
- Sign off :-D

Sponsored-by: ByWater Solutions

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-08 12:14:46 -03:00
64be74b338 Bug 18342: Enable memcached by default for new installs
Note that there is no way to create an install without memcached.
As it is now considered as stable, there is no point to not use it.

Test plan:
Create a new Koha install and make sure memcached is enabled by default

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-05-03 12:47:07 -03:00
385c16174b Bug 17468: Remove koha-*-zebra scripts and its traces
This patch removes traces from the (deprecated) koha-*-zebra scripts.

To test:
- Apply the patch
- Verify no traces of koha-*-zebra remain on the codebase (besides
  Release Notes and the koha-zebra script):
  $ cd kohaclone
  $ git grep koha-start-zebra
  $ git grep koha-stop-zebra
  $ git grep koha-restart-zebra
=> SUCCESS: No traces!
- Create the following symlinks:
  $ sudo ln -s /usr/sbin/koha-zebra  /usr/sbin/koha-start-zebra
  $ sudo ln -s /usr/sbin/koha-zebra  /usr/sbin/koha-stop-zebra
  $ sudo ln -s /usr/sbin/koha-zebra  /usr/sbin/koha-restart-zebra
- Try the koha-*-zebra commands:
  $ sudo koha-stop-zebra kohadev
  $ sudo koha-start-zebra kohadev
  $ sudo koha-restart-zebra kohadev
=> SUCCESS: They all work as expected!

- Sign off :-D!

Sponsored-by: Orex Digital

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-03-26 17:31:27 -03:00
f312f83dbc 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@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@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@bywatersolutions.com>

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-03-15 08:22:04 +00:00
06a1f18a1b Bug 17951: Make koha-create set template_cache_dir correctly
This patch makes koha-create (and friends) handle the template_cache_dir
config entry correctly.

It does so by:
- Adding a replaceable string to the template for koha-conf.xml
- Making koha-create-dirs create the needed directories (i.e.
 /var/cache/koha/instance and /var/cache/koha/instance/templates)
- Adding a --template-cache-dir switch to koha-create (so sysadmins can
  specify their favourite directory for the templates cache).
- koha-remove now takes care of the instance's *templates* dir.
- The install scripts now automatically create /var/cache/koha so it can
  be used later by koha-create and friends. It does so the same way it does
  for other install-created directories.

To test, you should ideally be able to build your own packages. This
instructions can be followed by people that doesn't have that ability
yet. But can be used on a custom packages setup too.

To test:
- Make sure you have the latest misc4dev in your kohadevbox (if it is a
  fresh box you have it already)
- Run:
  $ sudo perl misc4dev/cp_debian_files.pl
- Manually create the /var/cache/koha dir (skip if you have your own
        packages):
  $ sudo mkdir /var/cache/koha
- Create a new instance:
  $ sudo koha-create --create-db cachetest
=> SUCCESS:
    * /etc/koha/sites/cachetest/koha-conf.xml contains
    template_cache_dir and is populated with /var/cache/koha/cachetest/templates
    * The directory /var/cache/koha/cachetest/templates exists!
- Create a new instance, pass your own cache dir:
  $ sudo koha-create --create-db --template-cache-dir /tmp cachetest2
=> SUCCESS: etc/koha/sites/cachetest2/koha-conf.xml contains template_cache_dir
   and is populated with /tmp
- Run:
  $ man koha-create
=> SUCCESS: The docs mention the --template-cache-dir option switch
    correctly.
- Sign off :-D!

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

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-12-22 13:15:39 -03:00
6d677ef82f Bug 19462: Add koha-elasticsearch documentation
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-10-27 14:10:31 -03:00
cc0cf2b456 Bug 17467: Add koha-zebra documentation
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-10-27 14:10:30 -03:00
7efb871fa3 Bug 9409: (QA followup) Add --dbhost help to koha-create man page
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2017-08-15 12:17:44 -03:00
531ec010ca Bug 16749: Update debian docs for koha-translate
This patch adds the -d option to the documentation (with thanks to
Magnus Enger).

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Tested in a package installation of master+16749

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-02-17 13:20:57 +00:00
Magnus Enger
a5806c21d0 Bug 17266 - Update man page for koha-remove with -p
Bug 9754 added the -p|--purge-all option to koha-remove, but this
was not documented in the man page. This patch fixes that.

To test:
Run these commands and look at the formatted man page:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  debian/docs/koha-remove.xml
$ man -l koha-remove.8

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

Signed-off-by: Liz Rea <liz@catalyst.net.nz>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-15 13:46:10 +00:00
Magnus Enger
f31d3175b3 Bug 17267 - Document koha-create --adminuser
A description of --adminuser was missing from debian/docs/koha-create.xml
This patch adds a description in the Options section, as well as under
DEFAULTSQL in the list of configuration variables.

To test:
Run these commands and look at the formatted man page:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
  debian/docs/koha-create.xml
$ man -l koha-create.8

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

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Edited commit message to fix typo - koha-mysql -> koha-create as that's what we're testing. :)

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-09-09 09:26:45 +00:00
4e7734ce33 Bug 16016: Sitemap handling scripts for packages
This patch introduces the koha-sitemap script. This script wraps calls to
the misc/cronjobs/sitemap.pl script so it can be done easily instance-wise.

It sets /var/lib/koha/${instance}/sitemap as the destination directory for
the sitemap files. A followup will make them available through an Apache
configuration entry.

koha-functions.sh is provided with a handy is_sitemap_enabled function so
we can later add filters to other commands (koha-list, koha-foreach, etc).

Exposes sitemap files to apache. This is suitable for including the sitemap in
the robots.txt file as proposed in

  http://www.sitemaps.org/protocol.html#submit_robots

Note: it depends on Apache 2.4+ so we can patch the file as needed. Older
Apache users will be warned that they need to tweak the apache files on their
own.

To test:
- You can build a package out of this patchset, or do the following on a kohadevbox
  cp debian/scripts/koha-functions.sh /usr/share/koha/bin
- Run
  $ debian/scripts/koha-sitemap --help
- Go through all the options (--enable, --disable, generate).
(a) --enable:
  - debian/scripts/koha-sitemap --enable kohadev
=> SUCCESS: /var/lib/koha/kohadev/sitemap.enabled is created
  - call it again, a suitable warning is raised and the file is still there
(b) debian/scripts/koha-sitemap --disable kohadev
=> SUCCESS: /var/lib/koha/kohadev/sitemap.enabled is deleted
  - call it again, a suitable warning is raised and the file does not exist
(c) --generate:
  - debian/scripts/koha-sitemap --generate kohadev
=> SUCCESS: sitemapindex.xml and sitemap000X.xml files are generated in
            /var/lib/koha/kohadev/sitemap/
- Sign off :-D

Sponsored-by: Orex Digital
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-04 13:34:21 +00:00
Mirko Tietgen
2f634f2862 Bug 15303 Letsencrypt option for Debian package installations
New option koha-create --letsencrypt

- installs the letsencrypt package if needed
- creates <instance>
- generates letsencrypt certificates for <instance>
- sets up a https-only website for <instance>
- redirects http to https for <instance>

! you need to enable jessie backports to install letsencrypt: add
deb http://http.debian.net/debian jessie-backports main contrib non-free
to your /etc/apt/sources.list

! this patch uses the letsencrypt staging server
to create real certificates, apply thy "LE production server" patch

Test plan:
- build a debian package with patch applied
- use apache mod_ssl
  sudo a2enmod ssl
- make sure the machine is accessible on 80 (needed for letsencrypt) and 443 from the internet
- install koha with your new package
- Put your (existing) domain options in /etc/koha/koha-sites.conf
- use koha-create with the new options:
  sudo koha-create --create-db --letsencrypt <instance>
- if you do not have the letsencrypt package installed, you will be prompted to do that
  [
    if there is no package available, a symlink to the git checkout will work:

    on your test server, get letsencrypt via git
    git clone https://github.com/letsencrypt/letsencrypt

    create a symlink from /usr/bin/letsencrypt to letsencrypt-auto
    sudo ln -s /path/to/letsencrypt/letsencrypt-auto /usr/bin/letsencrypt
  ]

- wait until setup is finished, check that you got a working OPAC and staff client with certificates
- check that http redirects to https

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 13:04:31 +00:00
Tomas Cohen Arazi
997ad166c6 [SIGNED-OFF] Bug 15113: koha-rebuild-zebra should check USE_INDEXER_DAEMON and skip if enabled
This patch changes the behaviour of the koha-rebuild-zebra script in the following way:

USE_INDEXER_DAEMON=no
- Keeps the current behaviour

USE_INDEXER_DAEMON=yes
- It skips incremental indexing to avoid races.

Caveats:
- A --force option is introduced for useing in a specific situtation that might need it
 (i.e. the administrator knows what he's doing).
- If --full is passed, the reindexing is not skipped.

The documentation files and messages are adjusted accordingly.

This patch should help users that want to use the indexing daemon, in which case they wouldn't need
to change their default 5 min cronjob (it will be just skipped). Ultimately, koha-common could have
USE_INDEXER_DAEMON = yes by default, but that's subject for another bug report.

To test:
- Play with the different option switches and USE_INDEXER_DAEMON
- Things work as expected
- Sign off

Regards

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as expected

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

Signed-off-by: Your Full Name <your_email>
2016-04-19 17:47:42 +00:00
b7096c1bfa Bug 14532: Add --exclude-indexes switch to koha-dump
This patch changes the default behaviour of koha-dump to make the inclusion
of Zebra indexes on the dump optional. It does so by introducing a new option
switch that allows to have the previous behaviour in place.

To test:
- Run
  $ koha-dump your_instance
- Save a copy of the dump files
- Apply the patch / extract the koha-dump script
- Run the new one:
  $ koha-dump your_instance
=> SUCCESS: Verify the contents of the dump are the same
   (i.e. it includes /var/lib/koha/your_instance)
- Run with the new switch:
  $ koha-dump --exclude-indexes your_instance
=> SUCCESS: The dump does not contain stuff from /var/lib/koha/your_instance
- Go through the rest of the new option switches
  -h | --help
  -q | --quiet
=> SUCCESS: They work as expected.
- Sign off :-D

Regards

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

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-03-02 04:39:51 +00:00
003ff493b5 Bug 14674: [QA Follow-up] Typos and textual adjustment
This patch does:

[1] Resolve error [koha-create: line 294: local: `=upload21': not a valid
    identifier] by replacing $instance by instance.
[2] Resolved typo for 'specify'.
[3] Resolve error: [sed: -e expression #26, char 20: unknown option to `s']
    by replacing the slash in the sed line by a #. This makes sed not
    stumble over the slashes in the upload path.
[4] Added the aspect of permanent storage in the wording (as opposed to
    the storage of temporary uploads in /tmp or similar).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Verified that koha-create now inserts the right path in koha-conf.xml.
Verified that koha-create-dirs created the new uploads directory.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-23 10:09:32 -03:00
4a714313fe Bug 14674: koha-create should populate upload_path
This patch makes koha-create and koha-create-dirs aware of the new upload_path
configuration entry.

It defaults to /var/lib/koha/<instance>/uploads as proposed by Robin but lets the
user specify its own directory, using the --upload-path option switch that is
added by this patch.

koha-create-dirs is tweaked so it also creates this new directory.

The docs are updated accordingly.

To test:
- Apply the patch, have a packages setup (either by grabbing the relevant files [1]
  or by creating your own package).
- Run koha-create --create-db instance
=> SUCCESS: /var/lib/koha/instance/uploads directory is created
=> SUCCESS: /etc/koha/sites/instance/koha-config.xml has upload_path set correctly
- Create a new instance using the --upload-path making it point to whatever you want
=> SUCCESS: koha-conf.xml points to your chosen path
- Sign off :-D

Regards

Sponsored-by: Universidad Nacional de Cordoba

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Does not work in its current state. Needs a follow-up.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-23 10:09:32 -03:00
Barton Chittenden
72372e3895 Bug 12372: Updated man pages for koha-mysql
http://bugs.koha-community.org/show_bug.cgi?id=12372
Signed-off-by: Liz Rea <liz@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-24 13:18:12 -03:00
bc208d16e6 Bug 13791: koha-plack documentation
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-24 13:00:40 -03:00
89fb9c4a42 Bug 11927 - Add gr install option
Add greek as lang definition in installer.

Developed in collaboration with Giannis Kourmoulis <ikourmou@lib.auth.gr>

Test plan :
- Install using "gr" in "Primary language for Zebra indexing"
- check gr is used in etc/zebradb/zebra-*.cfg

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-21 10:58:58 -03:00
b2649cbcba Bug 12750: koha-create should be able to configure the Z39.50/SRU server
This patch adds two parameters to the koha-create command:

 --enable-sru: makes the koha-create script enabled the SRU server for
               the created instance

 --sru-port:   lets the user specify a desired port for the SRU server
               to listen at. It defaults to 7090

To test:
- Apply the patch on top of master
- Build your own package and install / can be tested just using the koha-create
  command on a 3.16+ packages install
- Create an instance as usual (i.e. without --enable-sru and --sru-port)
=> SUCCESS: The instance is created, the publicserver sections are
            both commented out. The first publicserver section has 7090 set as the
            listening port.
- Create an instance as usual, passing --sru-port 456
=> SUCCESS: The instance is created, the port is set but the publicserver sections
            are commented out
- Create an instance with --enable-sru (with and without --sru-port)
=> SUCCESS: Verify the instance is created as expected, with the SRU server enabled
            (port 7090 if no --sru-port passed, the one we chose otherwise).
- Verify that the docs also talk about this new parameters addition.
- Sign off :-D

Regards
To+

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-20 19:07:15 -03:00
eed7f263d0 Bug 8773 - Start per-instance koha-index-daemon in .deb setup
Short:

Launch an indexing daemon (rebuild_zebra.pl -daemon) process for each
enabled instance. Enabling/disabling the use of the indexer is handled
by global configuration variables in /etc/default/koha-common.

Also provides command line tools to manage the running indexer daemons
for your instances.

Long:

Using an indexing daemon avoids launching a new interpreter each time
the cron triggers the indexing, and also allows sub-minute incremental
reindexing, a requirement from our librarians.[1]

Using the indexer daemon could remain "experimental" until it gets more
testing; so is disabled by default initially. To enable the use of the
indexer the user has to tweak the /etc/default/koha-common config file.
Specifically the USE_INDEXER_DAEMON variable, which is clearly explained
in the file.

Frecquency defaults to 5 sec, and can be changed by tweaking the
/etc/default/koha-common config file too.

This patch uses rebuild_zebra.pl in daemon mode, but it is crafted to
allow changing the indexing daemon and passing specific option switches
it might need.

Regards
To+

[1] This is the .deb version of http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8519

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 09:15:22 -03:00
Reed Wade
d7a55f5890 Bug 8566: [SIGNED-OFF] Enable koha-foreach to insert the instancename into commands
koha-foreach has been modified to replace __instancename__ with $name
on each iteration using sed.

The docbook file for koha-foreach has also been updated to reflect the
new functionality.

To test:

    koha-foreach ls -ld /etc/koha/sites/__instancename__

should list directories instead of giving an error message.

Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
The suggested example with ls works as expected, as does my
more complex example with fines.pl:

koha-foreach --enabled /usr/share/koha/bin/cronjobs/fines.pl \
--out /var/log/koha/__instancename__/

The man page looks good too.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-02 15:45:25 -03:00
Magnus Enger
25c932967f Bug 10782 - Add a koha-mysqlcheck script
This patch adds the koha-mysqlcheck script, as a "frontend" for
the mysqlcheck command. It can be used to check the integrity of
database tables, as well as to repair them. See "man mysqlcheck"
for more information.

The script takes a Koha instance name as its only required
parameter. Any other parameters provided before the instance
name are passed directly to mysqlcheck, which means that all
the functionality of mysqlcheck is available through this script.

To test the script:
- Apply the patch, build your own packages and install them, or
- copy koha-mysqlcheck to a server already running off packages

- Run some variations of the command, with and without arguments,
  and check that the output makes sense. E.g.:
    sudo koha-mysqlcheck myinstance
    sudo koha-mysqlcheck -e myinstance # Extended checks
    sudo koha-mysqlcheck -e -v myinstance # Extended checks and verbose
- See "man mysqlcheck" for other relevant options

To test the man page:
- Run these commands and look at the formatted man page:
    $ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
      debian/docs/koha-mysqlcheck.xml
    $ man -l koha-mysqlcheck.8
- Make sure this test passes:
    $ prove -v xt/verify-debian-docbook.t

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-04-23 12:30:06 +00:00