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
mentioned in the list of "current queues"
- See https://wiki.koha-community.org/wiki/Testing_man_pages for
how to check the "man" page. There should be a new paragraph
about "Current queues" under "--queue"
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 3eff8d02b7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This removes the LEEME.Debian README file from the docs
directory. We don't even have an English README here as
we usually refer to the wiki for installation instructions.
It makes sense to remove it from the codebase.
To test:
* Verify that the file is removed
* Verify that all references to the file have been removed as well
Example: git grep LEEME
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a18e4d0e62)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
The koha-z3950-responder command does not have a man page.
This patch fixes that.
Test plan:
1) Apply this patch.
2) Run the following command to generate the new man page:
xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/manpages/docbook.xsl debian/docs/koha-z3950-responder.xml
3) View the generated man page with `man -l koha-z3950-responder.8`
(KTD users may need to `apt-get install man-db` first as
that package provides tools for reading manual pages)
4) Make sure this unit test passes:
prove -v xt/verify-debian-docbook.t
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
No more mention of verbose.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>