Commit graph

355 commits

Author SHA1 Message Date
a799879735 Bug 14532: (followup) Use tar's --exclude for simplicity
This patch creates an --exclude definition for the tar command
so it is easier to stack excluded stuff. It does so for the
authority and biblio indexes if --exclude-indexes is passed.

A side effect from this, is that uploads and plugins are still
backed up, as Jonathan noted.

Regards

Edit: Fixed a weird quoting problem.

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

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
Robin Sheat
de741ca0fe Bug 14532: fixed the "empty member" problem
PS: thanks to Olly Betts for knowing weird bash constuctions.

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
Robin Sheat
9be3b61afa Bug 14532 - fix syntax error in script
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
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
d9dc15f21e Revert Bug 11081 - Port Koha::Contrib::Tamil indexer into Koha code base
It has been decided that Moose should not be a dependency for Koha, and
that this patch set should be reverted to avoid it's use.

This reverts commit 43bcc1c42c.
This reverts commit e5f4a0e3d5.
This reverts commit 6d44b0a91a.
2016-03-01 16:56:35 +00:00
af47f00636 Bug 15713: Restart zebra when rotating logfiles
Somehow, it may happen that Zebra keeps writing to the old rotated logfile
with extension .log.1. I must add that although I saw that happen (a new
log was created and was empty, while Zebra kept writing to log.1 for weeks),
I cannot reproduce it every time.

By stopping the zebra server in prerotate and starting it again in
postrotate, this should not happen at all. In practice, this implies that
your Zebra server is restarted once a week.

Note: The existing sharedscripts directive makes sure that these actions
are not executed for all individual logfiles but once for all matching
logfiles (even when running multiple instances).

Test plan:
[1] Apply the change in koha-common.logrotate to the file
    /etc/logrotate.d/koha-common.
[2] Run logrotate -f /etc/logrotate.conf (forcing a logrotate).
[3] Check in zebra-error.log that your zebra server was stopped
    ('killed by signal 15').
[4] Verify that your Zebra server runs (read: has been restarted).
    (Do a search..)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc Véron <veron@veron.ch>

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

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-02-24 03:41:10 +00:00
af6488b157 Bug 15714: Add zebra_loglevels to koha-conf.xml
This patch adds a commented zebra_loglevels line to the config file.
Behavior does not change, but an admin can easily edit the variable.

Test plan:
Nothing really changed. But if you are not so sure about that, apply the
change to /etc/koha/koha-conf-site.xml.in and run koha-create. Check
that the new koha-conf contains the line and is not messed up.

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

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

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-02-24 03:38:18 +00:00
7412523624 Bug 15714: Remove zebra.log and add loglevels
The file zebra.log is actually not used, because daemon's --output
parameter sends all message to zebra-output (making that stdout
goes there too and --stdout does nothing). We do not need any
differentiation (if any at all) here; behavior does not change.

Note: zebra-error will only contain the daemon's error messages and not
the zebra error messages! So you will probably only find messages about
stopping zebra in zebra-error.

The loglevels are by default none,fatal,warn and can be changed via the
zebra_loglevels config variable (read by koha-functions.sh). If you remove
'none', you will have request-messages in the log. You can also keep 'none'
and add 'request' to achieve something similar (undocumented however).

Some of the parameters passed to daemon when stopping zebra are
superfluous and have been removed.

Test plan:
[1] Remove the file zebra.log. Look at last lines in zebra-error and
    zebra-output.
[2] Remove zebra_loglevels from koha-conf (if present).
    Start/restart Zebra. Search to verify if Zebra runs.
    Stop Zebra and check zebra-error for a new line (killed by signal 15).
[3] Add fatal,warn in koha-conf:zebra_loglevels (do not include 'none').
    Start Zebra. Check zebra-output for a line "[log] zebra_start".
    Do a search and check zebra-output for lines with "[request]".
[4] Verify that zebra.log did not appear again.

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

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

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-02-24 03:38:18 +00:00
dbb24a676e Bug 15714: Add get_loglevels to koha-functions.sh
Preparing for including different log levels in koha-start-zebra.
Note that the default response is none,fatal,warn; this is equal
to the options passed to zebrasrv in koha-start-zebra (for now).

Test plan:
[1] Run on the command line: source koha-functions.sh
[2] Type get_loglevels [your_instance]
    By default, you should see: none,fatal,warn
[3] Add this line to your koha-conf:
    <zebra_loglevels>how,are,you</zebra_loglevels>
[4] Run get_loglevels [your_instance] again.
    Remove the nonsense log levels again..

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

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

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-02-24 03:38:17 +00:00
Tomas Cohen Arazi
43bcc1c42c Bug 11081: (followup) Rebuild debian/control
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-02-16 18:52:36 +00:00
Liz Rea
4c781d9911 Bug 13143 - Detect if the password is in a pipe
1. cd kohaclone/debian/scripts
2. sudo koha-passwd instance | cat
   Output should be password only
3. sudo koha-passwd instance
   Output should be "Password for $instance is: $password"

Does this get at what you were wanting, Robin?

NOTE:
$ cd ~
$ sudo mkdir /etc/koha
$ sudo mkdir /etc/koha/sites
$ sudo mkdir /etc/koha/sites/library
$ sudo ln -s ~/koha-dev/etc/koha-conf.xml /etc/koha/sites/library/koha-conf.xml
$ sudo mkdir /usr/share/koha
$ sudo ln -s ~/kohaclone/debian/scripts /usr/share/koha/bin

This will fake out your system enough to get koha-passwd to run in your git
system. Since you are using your git system, no need for the sudo's in
steps 2 & 3. And no need to roll a custom build to test it.

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 06:27:08 +00:00
Mark Tompsett
d8a123393d Bug 13143: Followup - Correct the pause message
'read anykey' actually requires enter under sh.
This patch changes the string from:
    'Press any key to clear the screen...'
to
    'Press enter to clear the screen...'

TEST PLAN
---------
1) Apply the first two patches
2) Trigger the script.
2) Press 'q' or anything other than enter when prompted.
   --- You could type a whole sentence! Oops!
3) Press enter.
4) Apply this patch
5) Trigger the script.
6) Be happy that you aren't told any key will work.
7) run koha qa tools

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

http://bugs.koha-community.org/show_bug.cgi?id=13141

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 06:27:08 +00:00
Liz Rea
2b43e9312c Bug 13143 - follow up - usability improvements
* makes sure output is not on the line with the prompt
* adds ability to clear screen after password display

Same test plan as for original bug.

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 06:27:08 +00:00
78a6f7b0e7 Bug 13143 - Add a tool to show a Koha's password
to test...

1/ run without any args, and get some help
 # koha-passwd
Displays a Koha instance's password.

Usage: /usr/sbin/koha-passwd instancename1 instancename2...

Missing instance name...

2/ run with a bad instance, get an error
 # koha-passwd xxxxx
Unknown instance xxxxx

3/ run with a correct instance, get a password
 # koha-passwd koha1
foofoo69

4/ run with many instances, get many passwords
 # koha-passwd koha1 koha2 koha3
foofoo69
foofoo68
foofoo67

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

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 06:27:07 +00:00
Hector Castro
22dbfca235 Bug 13642 - Remove MARC::Crosswalk::DublinCore from Koha
To test:

1) git grep "MARC::Crosswalk::DublinCore"

C4/Installer/PerlDependencies.pm:    'MARC::Crosswalk::DublinCore' => {
INSTALL.fedora7:MARC::Crosswalk::DublinCore

2) git grep "libmarc-crosswalk-dublincore-perl"

debian/control: libmarc-crosswalk-dublincore-perl,
debian/control: libmarc-crosswalk-dublincore-perl,
install_misc/debian.packages:libmarc-crosswalk-dublincore-perl install
install_misc/ubuntu.10.04.packages:libmarc-crosswalk-dublincore-perl    install
install_misc/ubuntu.12.04.packages:libmarc-crosswalk-dublincore-perl    install
install_misc/ubuntu.packages:libmarc-crosswalk-dublincore-perl  install

3) Repeat step 1 and 2

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
  Ripping out any mention to MARC::Crosswalk::DublinCore can't hurt.

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 06:23:08 +00:00
1d99fa026b Bug 9754: koha-remove optionally includes var/lib and var/spool
Currently, the files in the folder /var/lib/koha/[instance] and also
in /var/spool/koha/[instance] are not removed.
This patch adds the option -p|--purge-all to include those two
directories when removing files.

Note: There was a small bug in the for loop. On the -k line the extra
shift statement is one too much.

NOTE: Verify that you use the adjusted koha-remove in the test plan
and not accidentally an older version of this script.

Test plan:
[1] Create an instance test.
[2] Run koha-remove and verify that /var/lib/koha/test still exists.
[3] Create an instance test2.
[4] Run koha-remove -k -p and verify that the sql database still exists
    but the two instance folders in var/lib/koha and var/spool/koha are
    gone.

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 02:29:11 +00:00
8d3eb52eda Bug 15626: Remove log4perl.conf when using koha-remove
if you create a koha install using koha-create, and remove it with
koha-remove, the /etc/koha/sites/$SITE/ directory won't be removed,
because the /etc/koha/sites/$SITE/log4perl.conf has not been removed by
this script.

Test plan:
Use this koha-remove script to remove a koha install
Without this patch, the /etc/koha/sites/$SITE directory won't be
removed.
With this patch applied, the directory will be correctly removed.

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 01:10:16 +00:00
00bb0b6d57 Bug 14939: Modularize OAI Server existing classes
Koha OAI server has been done in one unique .pl file because there
wasn't any object model or rules in the Koha project when it has been
coded. This patch modularized existing classes, putting each class in a
separate file in Koha::OAI::Server namespace. UT begining.

Add new dependency: Capture::Tiny

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
OAI server moduralized succefully. Works for Debian Jessie and
Wheezy. Test pass successfully

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2015-12-31 15:15:05 +00:00
29cd4ae9bd new Debian package maintainer
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2015-12-05 01:26:11 +00:00
5574a2fc49 Bug 15218: (QA followup) Fix wording of comment
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-20 11:20:47 -03:00
65283e72ca Bug 15218: (Plack) Make processes that rely on background jobs run in CGI mode
This patch adds an entry to the plack-related apache configuration so the
problematic scripts (that fail under plack/starman) are not processed through
Plack but in CGI mode instead.

To test:
- Follow the setup steps from bug 15032
- Add the line from this patch to /etc/koha/apache-shared-intranet-plack.conf
 (if you are on kohadevbox you should probably change the filesystem path to
  /home/vagrant/kohaclone/tools/background-job-process.pl)
- Do the full import process of MARC data.
=> SUCCESS: It works as expected.
- Sign off :-D

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-20 11:20:35 -03:00
Hector Castro
f464af4141 Bug 14870: Remove C4::Dates from plack.psgi and koha.psgi
Remove C4::Dates from .psgi files from preloaded modules, placing
Koha::DateUtils instead

http://bugs.koha-community.org/show_bug.cgi?id=14870
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-19 13:05:06 -03:00
Robin Sheat
bbc4eb4663 Changelog update for 3.22.00~beta 2015-11-17 23:41:16 -03:00
Robin Sheat
a98776756f Bug 13799: (PM followup) Dependency updates
Added new rependencies.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-11-11 15:49:23 -03:00
0ba1fb9e77 Bug 15011: koha-indexer should define the --pidfiles on starting the daemon
The --pidfiles options is not provided on starting the daemon and the is_indexer_running consider that the daemon is not running

Test plan:
koha-indexer start
koha-indexer stop

should start and stop the zebra daemon wuthout any error.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Tested on kohadevbox:ansible

sudo debian/scripts/koha-indexer --stop kohadev
sudo debian/scripts/koha-indexer --start kohadev
sudo debian/scripts/koha-indexer --restart kohadev

All work as expected on the different scenarios.
2015-11-10 15:17:45 -03: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
0e9e51db94 Bug 15012: use sudo instead of su in koha-shell
Not sure this is the best way to fix it but it looks to work.

Test plan:
  sudo koha-shell kohadev
should not return any error
Without this patch, you should get
  bash: cannot set terminal process group (-1): Inappropriate ioctl for device
  bash: no job control in this shell

Confirm that other options work as before

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected. Tested on kohadevbox:ansible.
KOHA_CONF and PERL5LIB are correctly set on the child shell.
Bonus point: koha-shell doesn't die if the user issues Ctrl+C to abort an execution.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-22 00:02:50 -03:00
9043a27b03 Bug 14727: koha-indexer tab completion in bash
This patch introduces tab-completion in bash to the koha-indexer
command. It completes using valid option switches and instance names.
It stops completing then -h or --help are issued, and once a command
switch is chosen (either --start, --stop or --restart) it goes ahead
with valid instances completion.

To test:
- Have a packages install (kohadevbox works)
- Run:
  $ . debian/koha-common.bash-completion
- Type
  koha-indexer <tab>
- Play with all the options
=> SUCCESS: They work as they should.
- Sign off :-D

Note: it fixes a small glitch on the plack completion.

Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
Verified working, including filtering out already used options and
instances.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-13 11:37:55 -03:00
Amit Gupta
4fa33e055c Bug 14840: Added new cron script send membership expiry reminder notices in crontab.example file
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: Added koha-common.cron.daily.
Note that the cronjob only does something when the pref is set now.
See corresponding change on bug 6810.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-06 11:21:18 -03:00
Robin Sheat
49a09f6db2 Bug 14938: fix dependencies
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-10-01 23:43:02 -03:00
Julian FIOL
bb4b7f46d1 Bug 13585: Add a cronjob which send UsageStats monthly.
This patch introduces entries for monthly running the share_usage_with_koha_community.pl
script to the packages and also the crontab.example file for manual
installs use.

Edit: I fixed the Copyright line

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>
2015-09-07 10:47:06 -03:00
f9e24c8d4f Bug 13791: (QA followup) fix perlcritic warning
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-08-28 10:21:44 -03:00
Robin Sheat
b18f86e75c Bug 13791: (PM followup) Dependency normalisation for master
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-08-28 09:17:05 -03:00
63970ff4a2 Bug 13791: (RM followup) Add new dependencies for packaging
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-08-27 13:18:28 -03:00
55a52c1218 Bug 14714: Add tab-completion to koha-mysql command
This patch introduces tab-completion in bash to the koha-mysql
command. It completes using valid instance names. It stops completing
once an instance name is chosen (i.e. it respects the fact that
koha-mysql accepts only one instance name as parameter).

To test:
- Have a packages install (kohadevbox works)
- Run:
  $ . debian/koha-common.bash-completion
- Type
  koha-mysql <tab>
=> SUCCESS: You are prompted valid instance names for completion.
- Sign off :-D

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-08-26 10:44:01 -03:00
Benjamin Rokseth
e09e7152b6 Bug 14361: koha-restart-zebra fails and probably breaks upgrade
This patch fixes the koha-restart-zebra and koha-stop-zebra scripts
by adding pidfiles folder to the test is_zebra_running.
It also adds pidfiles to the test is_indexer_running so that
koha-rebuild-zebra will work properly.

Test plan:
1) check if zebrasrv is running, get pid of zebrasrv
   ps ax | grep zebrasrv
2) In my case, there was also a warning on the about.pl page on a fresh
   install: Error message from Zebra: 1011 (bad credentials)
3) try to restart zebra
   koha-restart-zebra instancename
   You will get a msg :
   Zebra does not appear to have been running for instancename
   Starting Zebra server for instancename
4) check again if zebrasrv is running
    ps ax | grep zebrasrv
   and see that pid has not changed, thus it is not restarted
5) Apply patch
6) repeat 4) and watch now how pid has changed
   If there was a warning on about.pl it should now be gone

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Good catch Benjamin! It works as expected with the patch.
2015-08-26 10:42:04 -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
Barton Chittenden
c30985920d Bug 12372: (QA followup) Standardized argument parsing 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:08 -03:00
Barton Chittenden
553b277492 Bug 12372: koha-mysql: process any mysql args
Signed-off-by: Ian Bays <ian.bays@ptfs-europe.com>
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:08 -03:00
Tomas Cohen Arazi
58b29655dd Bug 13791: (QA followup) Plack support requires Apache 2.4.8+
The Apache 2.4 documentation says UDS support for ProxyPass has been
introduced in Apache 2.4.7. That's what is shipped by Koha's supported
Debian / Ubuntu versions.
But it is not true, empiric tests and even the changelog for the apache
project says the feature got introduced in 2.4.8. So to avoid breakages
I raised the version number test on the apache files to 2.4.8.

New bugs will be filled for dealing with this if we find it necessary.

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-24 13:06:39 -03:00
76f3c5794c Bug 13791: tab-completion for koha-plack in bash
This patch adds tab-completion in bash for the koha-plack command.

After the --start, --stop, --restart and --disable switches it only offers
plack-enabled instances.  And disabled instances to --enable.

--help and -h just finish end the completion.

--quiet and -q are trickier to implement. They will work (be offered)
only before the action switches.

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:41 -03:00
dc742ec9b5 Bug 13791: make koha-common init script aware of plack
This patch makes the packages' koha-common script aware of plack.
It does so by relying on koha-list --plack to know which instances
have Plack configured, and uses the koha-plack script to manage
the running daemons.

It also introduces a plack_status function to check the status of
the Plack daemon when called:

   $ servive koha-common status

Regards

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:41 -03:00
d863757fa7 Bug 13791: make koha-list aware of plack
This patch adds the --plack and --noplack option switches to koha-list
for filtering instances to be listed.

This is particularly important for init scripts and cronjobs.

To test:
- Play with koha-list --plack and koha-plack --enable/--disable and verify that
koha-list returns the expected results.

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:41 -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
4182a08052 Bug 13791: Apache configuration files
This patch adds an include to each VirtualHost definition (OPAC and Intranet)
and a variable definition, taking advantage of Apache 2.4.x features.

The instance name is reused inside the includes providing a simple way of
dealing with the apache <-> plack configuration.

A check for the right apache version is introduced, in the for of an IfVersion block:

<IfVersion >= 2.4>
  --- Plack configuration here ---
</IfVersion>

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
4adc4ee5f8 Bug 13791: Plack out-of-the-box support on packages
This patch introduces a koha-plack script that controls running Plack
processes for each instance. They are run using 'starman', listening
on a Unix Domain Socket (UDS):

  /var/run/koha/<instancename>/plack.sock

The plack configuration file[1] is expected to be on:

  /etc/koha/plack.psgi

and is installed by the package.

It also adds the following helper functions to koha-functions.sh:

 - is_plack_enabled
 - is_plack_running

Done:
- koha-plack script
- suitable psgi file

To test this patches you will need to install
- starman
- libplack-middleware-reverseproxy-perl

[1] Yeah, a single file. Because we will be relying on multiple mount
points for each "app" (i.e. 'opac' and 'intranet', and 'api' ;-) )

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:39 -03:00
Tomas Cohen Arazi
7fe69d8e5d Bug 6874: (QA followup) upload_path missing in koha-conf.xml.in
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-11 11:57:21 -03:00
3e9b80e0a5 Bug 12216: One should be able to override zebra config
One should be able to override zebra configuration on a per instance
basis.  This patch adds /etc/koha/sites/instance to the 'profilePath'
in the zebra config files such that that location is sources first
for any override config files.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Great catch Martin. I thought this was already pushed by the way.

Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
This will be useful.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-08-03 11:59:03 -03:00
Robin Sheat
224d4d4dec Bug 14167: remove the log4perl.conf file from /etc for packages
We don't need that file in the package build because it's generated on a
per-site basis from a template.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-07-24 12:54:23 -03:00