As requested by Jonathan on comment 10 on Bugzilla and supported by Tomas,
we should use the dev_install entry in koha-conf as a boolean flag.
Since we already used it as a path, this patch is not too strict about it.
If the entry is not empty and not equal to "0", we will interpret it as
a true value. The path is taken from the intranetdir entry.
Test plan:
[1] Copy debian/scripts/koha-functions.sh to /usr/share/koha/bin
[2] For a dev install:
Remove the dev install line, or toggle its value between empty string,
0 or 1 and each time test stop/start koha-indexer.
Check the path to rebuild_zebra with ps aux|grep indexer.
If you have no entry, an empty entry or a zero, you should see a regular
path.
(Note: You can do something similar with koha-start-sip.)
[3] For a regular install:
Remove the dev install line.
Stop/start koha-indexer or koha-plack, and verify that it still works.
Add a dev_install line with 0, and repeat stop/start.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
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>
[AMENDED February 10, 2017]
[1] Added reading /etc/default/koha-common as in the other debian scripts.
We need it for KOHA_HOME.
[2] Add a -d|--dev parameter for dev installs.
[3] No hardcoded PERL5LIB or KOHA_INSTALL_DIR (KOHA_HOME).
They are read from default file or set by adjust_paths_dev_install.
[4] Adjust template paths for dev installs: OPAC_TMPL, INTRANET_TMPL.
[5] Remove references to obsolete themes ccsr and prog.
Test plan:
[1] Regular package install:
Copy koha-translate to /usr/sbin.
Run koha-translate -l to show installed languages.
Run koha-translate -l -a to show available languages.
Add a language: koha-translate -i nl-NL.
Check template folders in regular location (/usr/share/koha/...)
Remove a language: koha-translate -r nl-NL. Check again.
[2] Dev install or kohadevbox:
Copy koha-translate to /usr/sbin.
If needed, add the <dev_install> line to koha-conf.xml.
Run koha-translate -l -d yourinstance to show installed languages.
(Note: You only see the languages installed in this instance.)
Add a language: koha-translate -i nl-NL -d yourinstance.
Check template folders in the clone.
Remove a language: koha-translate -r nl-NL -d yourinstance.
Note: Make sure you have sufficient file permissions for the kohaclone
files and koha-conf.xml. On kohadevbox you might need to run sudo
koha-translate within the the vagrant user context.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested on Jessie (Debian VM and Kohadevbox)
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>
[1] Use run_safe_xmlstarlet for plack workers and requests
[2] Simplify adjust_paths. The lazy export statement is actually enough to
replace adjust_paths by one direct call to adjust_paths_dev_install.
Test plan:
[1] Copy koha-functions.sh and koha-plack:
cp [YOUR_PATH]/debian/scripts/koha-functions.sh /usr/share/koha/bin/
cp [YOUR_PATH]/debian/scripts/koha-plack /usr/sbin/
where YOUR_PATH might well be /home/vagrant/kohaclone.
[2] Make sure that you have dev_install in koha-conf.
Stop and start koha-plack. Verify with ps aux|grep plack.
[3] Rename dev_install to nodev_install (in start and end tag).
Now stop/start koha-plack. Verify with ps aux|grep plack.
[4] Change plack_requests to 51 in your koha-conf.
Restart Plack and check that you see 51 in ps aux|grep plack.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested on Jessie (Debian VM and Kohadevbox)
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>
In various scripts we use xmlstarlet to extract values from koha-conf.
If we call xmlstarlet on non-existing entries in koha-conf, this may
however result in silently failing scripts (when set -e is in effect).
A function run_safe_xmlstarlet is added for situations where the entry
might not exist. It will not halt execution.
This patch only adjusts koha-functions.sh and modifies the xmlstarlet calls
for dev_install and zebra_loglevels.
Note: The function does not need to check file existence. If the file does
not exist, xmlstarlet warns about it; the function returns empty string,
but does not set an error exit status.
Test plan: See second patch ("koha-plack adjustments").
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
It would be nice if we could control the number of workers and max
requests on a per instance basis, rather than the numbers being
hardcoded in the plack startup script.
Test Plan:
1) Build a new package of Koha with this patch applied ; )
2) Verify koha-plack still works
3) Add the following to the config section of your koha-conf.xml:
<plack_max_requests>75</plack_max_requests>
<plack_workers>4</plack_workers>
4) Stop plack
5) Start plack
6) Verify the number of works and max requests worked!
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Larry Baerveldt <larry@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Rebased against master and added a description for the new configuration
entries
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
In the meantime api was enabled in plack.psgi and needs a little tweak
too for a dev install.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch makes the following changes:
koha-foreach, koha-upgrade-schema (shell scripts):
[1] Read default file
[2] Include helper functions
[3] Add call to adjust_paths_dev_install
[4] Replace hardcoded path by $PERL5LIB
koha-shell (perl script):
[1] Remove hardcoded lib path
[2] Add a sub that reads PERL5LIB from default or koha-conf, just as the
shell scripts do.
koha-plack (shell script), plack.psgi:
[1] Add call to adjust_paths_dev_install
[2] Remove hardcoded lib path
[3] Add installer path to PERL5LIB, remove it from plack.pgsi
koha-sitemap (shell script):
[1] Add call to adjust_paths_dev_install
[2] Remove hardcoded lib path
[3] Add installer path to PERL5LIB
[4] Adjust path for call to sitemap cron job
koha-start-sip (shell script):
[1] Read default file
[2] Include helper functions
[3] Add call to adjust_paths_dev_install
[4] Adjust path to C4/SIP
koha-stop-sip (shell script):
[1] Remove KOHA_CONF and PERL5LIB (not needed to stop the daemon)
[2] Same for paths in daemon client options
NOTE: Script debian/scripts/koha-upgrade-to-3.4 has been left out
intentionally.
Test plan:
[1] Regular install:
Run koha-foreach echo Hi
Run koha-upgrade-schema yourinstance
Run koha-shell yourinstance
If you have plack, run koha-plack --start|--stop yourinstance
Run koha-sitemap --generate yourinstance
Run koha-start-sip yourinstance
Run koha-stop-sip yourinstance
[2] Dev install [yourinstance] with <dev_install> in koha-conf.xml:
Run koha-upgrade-schema yourinstance
Run koha-shell yourinstance
If you have plack: koha-plack --start|--stop yourinstance
Run koha-sitemap --generate yourinstance
Run koha-start-sip yourinstance
Run koha-stop-sip yourinstance
[3] Git grep on koha/lib
You should no longer see occurrences in debian/scripts except:
koha-translate: see report 16749
koha-upgrade-to-3.4: left out intentionally
[4] Git grep on koha/bin
You should only see hits for lines with koha-functions in the
debian scripts except:
koha-upgrade-to-3.4: left out intentionally
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Most scripts tested on Wheezy (although it would not matter much).
Plack script tested on Jessie.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
[1] Add a call to the new adjust_paths_dev_install
[2] Differentiate location of rebuild_zebra.pl
[3] Replace a hardcoded path by $PERL5LIB
Test plan:
Adjust a biblio record in package or dev install.
Run koha-rebuild-zebra -b -z for same instance.
Verify that the change has been indexed.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
[1] Add a call to the new adjust_paths_dev_install
[2] Differentiate location of rebuild_zebra.pl
NOTE: The scripts assume koha-functions.sh to be in /usr/share/koha/bin.
Finding a better location for this shell library may be hard.
Test plan:
Run koha-indexer for a regular package install or a dev install.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This new function checks koha-conf.xml for a given instance and if it
contains a dev_install line, it adjusts PERL5LIB and KOHA_HOME
accordingly. Otherwise it does not touch the values of these
variables as normally read from /etc/default/koha-common.
The function will be used in various debian scripts to allow for more
flexibility with dev installs. And at the same time aiming to make better
use of PERL5LIB and KOHA_HOME.
Test plan:
[1] Add <dev_install>/not/there</dev_install> to your koha-conf.xml.
[2] Run on the command line:
PERL5LIB=test
source [path-to-your-instance]/debian/scripts/koha-functions.sh
echo $PERL5LIB
adjust_paths_dev_install [name-of-your-instance]
echo $PERL5LIB
The last echo should be: /not/there
[3] Remove the <dev_install> line and repeat step 2.
The last echo should be: test
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
And comment it, as we don't know what are the sysop's preferences
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
If the temporary upload folder exists, it should be discarded when
removing an instance. If we do not, it may/will create problems when
recreating the same instance.
A function in koha-functions.sh is added to determine the temp directory
instead of hardcoding /tmp.
Test plan:
[1] Copy koha-functions.sh to /usr/share/koha/bin
[2] Run koha-create --create-db newinstancexx
[3] Run mkdir /tmp/koha_newinstancexx_upload (if /tmp is your temp!)
[4] Run debian/scripts/koha-remove newinstancexx
Do not run the regular one, but verify that you use the updated one.
[5] Check that /tmp/koha_newinstancexx_upload is gone.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Karen Jen <karenliang.student@wegc.school.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-create-defaults substitutes the instance name with the placeholder
__KOHASITE__ in the SQL file that it creates. If the instance name is
something common, like "data", this means that way too many substitutions
will be made, and when koha-create uses the SQL file as a template, broken
data can be the result.
The solution in this patch was suggested by drojf on IRC.
To test:
- Create an instance called "data"
- Run "sudo koha-dump-defaults data > test.sql"
- Take a look at test.sql and verify there are way too many occurences
of __KOHASITE__, like "-- Dumping __KOHASITE__ for table `accountlines`"
- Apply the patch
- Copy the resulting koha-create and koha-dump-defaults to somewhere
running off the packages
- Run "sudo koha-dump-defaults data > test.sql" again and verify there
are only 4 occurrences of __KOHASITE__, in places that make sense
- Create an instance with something like:
$ gzip test.sql
$ sudo koha-create --create-db --defaultsql test.sql.gz test17265
- Verify that you have a working Koha install
Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Works as expected.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch adds the job to debian package file and the examples file
in misc.
Test plan:
Add these lines to your cron file.
Check the results. (If an issue you expect passes the grace period defined
in the subscription, its status should go from Expected to Late.)
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Adding POD, changing the config files to live in a path pointed to by
koha-conf.xml
This means multiple instances can have their own config
Please test the 2 patches together
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Arbitrary arguments can be passed to SMS:Send
drivers. If an argument is provided that has already been set by
SMS::Send or the driver, it will be overwritten by the value from
the YAML file. My only suggestion for an improvement would be an
example of what the YAML should look like, but that is a minor thing.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
See the bug description for the details.
Test plan:
Use this script to create a new koha installation, using MariaDB
You should not display
"user koha_kohadev doesn't have enough privilege on database koha_kohadev "
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Confirm that this still works (with MySQL).
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
MetaSearcher.pm forks children to handle searching each server. When the
process waits for the children it never continues.
The simplest solution here is to exclude the metasearcher service from
running under plack
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch makes koha-remove stop all instance's services before
attempting to remove the system user,
Before this patch, only zebra was stopped.
To test:
- Run:
$ sudo koha-create --created-db favourite_name
- Run:
$ sudo koha-remove favourite_name
=> FAIL: koha-indexer is still running for user favourite_name-koha
- Run:
$ sudo koha-create --created-db another_name
$ sudo koha-plack --enable another_name
$ sudo koha-plack --start another_name
$ sudo koha-indexer --stop another_name
$ sudo koha-remove another_name
=> FAIL: koha-plack is still running for user another_name-koha
- Apply the patch
- Repeat the previous tests, with new names
=> SUCCESS: Everything works as expected :-D
- Sign off :-D
Signed-off-by: Lucio Moraes <lmoraes@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Test plan:
1) Apply patch
2) Create new instance with parameter --zebralang cs
3) Insert some record with basic latin characters and some with "czech" characters (for example: "č" - should be sorted after "c", "š" - should be sorted after "s")
4) Try to search in katalog (staff and opac) and sort by other field then relevance - title or author for instance
5) Records should be sorted correctly by Czech rules
6) Look at code and confirm it is ok
Signed-off-by: radiuscz <radek.siman@centrum.cz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
I did not test this patch, but trust in the author and signoffer
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This was not added to the old etc/koha-httpd.conf because that file has
no infrastructure for Plack anyway.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This allows OVERRIDE_SYSPREF_* and others to work properly.
Test plan:
1) Add the following line to your plack.psgi (near the bottom, just
above "mount ..."):
enable "+Koha::Middleware::Plack";
2) Load the OPAC advanced search page (under Plack). The title should
read "Koha online catalog" (or whatever your LibraryName syspref
contains).
3) Add the following to your Apache configuration:
RequestHeader add X-Koha-SetEnv "OVERRIDE_SYSPREF_LibraryName Potato\, Potato"
4) Restart Apache.
5) Refresh. The title should now read "Potato, Potato online catalog".
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Set min version for libmojolicious-perl to 6.0 and regenerate debian/control
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 13799 introduced the api_secret_passphrase on source installs, but missed to do so on packages.
This patch introduces the entry on the template koha-conf-site.xml.in file, and
patches koha-create so it generates a randomized string (64 chars) to put in it.
To test:
- Apply the patch
- Grab the new template file:
$ sudo cp kohaclone/debian/templates/koha-conf-site.xml.in \
/etc/koha
- Create a new instance:
$ kohaclone/debian/scripts/koha-create --create-db blah
=> SUCCESS: The script runs fine, /etc/koha/sites/blah/koha-conf.xml
contains the api_secret_passphrase entry.
- Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch removes Memcached configurations from the shipped apache files.
Note: testing is not actually needed for this patch, as it is really trivial. But I
include testing steps, just in case QA members require it.
To test:
- Apply the patch
- Do a (standard/dev/single) Koah install
=> SUCCESS: Verify the resulting koha-httpd.conf file doens't include memcached data
- Have a packages install
- Replace
* /etc/koha/apache-site-https.conf.in
* /etc/koha/apache-site.conf.in
with the ones from this patch
- Create an instance
=> SUCCESS: The apache configuration doesn't include memcached configurations
- Sign off :-D
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch introduces the memcached_servers and memcached_namespace
configuration entries as expected by 11921.
Note: better test this one and the followup together to ease the process.
To test:
- Do a source Koha install (dev, standard, single)
=> SUCCESS: The resulting koha-conf.xml file includes the memcached_* entries
which are filled with the right values.
- In kohadevbox (packages setup):
- Replace /etc/koha/koha-conf-site.xml.in with the one from this patch
- Create a new koha instance
=> SUCCESS: The instance's koha-conf.xml includes the relevant entries
- Sign off
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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>
This patch removes the --quiet option switch in koha-common.init so
problem information is not hidden for sysadmin users.
To test:
- Have plack enabled for a koha instance:
$ sudo koha-plack --enable kohadev
$ sudo koha-plack --start kohadev
- Run:
$ cd kohaclone
$ debian/koha-common.init {start|stop|restart}
=> SUCCESS: No behaviour change
- Disable the 'cgi' apache module:
$ sudo a2dismod cgi
- Run:
$ debian/koha-common.init {start|stop|restart}
=> FAIL: No warning is shown
- Apply the patch
- Run:
$ debian/koha-common.init {start|stop|restart}
=> SUCCESS: Warnings show up
- Sign off :-D
Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Perfect thanks :)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended the patch to adjust a typo: ndex should be index.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Test plan:
1) Shut down the Plack server.
2) The OPAC and staff side homepage should still load (as it is
mistakenly being loaded via CGI).
3) Apply patch.
4) Both homepages should now not load.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The C4::Category module contained only 1 method to return the patron
categories available for the logged in user.
The new method Koha::Patron::Categories->search_limited does exactly the
same thing (see tests) and must be used in place of it.
Test plan:
- Same prerequisite as before
For the following pages, you should not see patron categories limited to
other libraries.
- On the 'Item circulation alerts' admin page
(admin/item_circulation_alerts.pl), modify the settings for check-in
and checkout (NOTE: Should not we display all patron categories on
this page? If yes, it must be done in another bug report to ease
backporting it).
- Search for patrons in the admin (budget) and acquisition (order) module.
- On the patron home page (search form in the header)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
We need to define several namespaces for our cache system.
For instance sysprefs, koha conf (koha-conf.xml) and unit tests
should be defined in a separate namespace.
This will permit to
- launch the tests without interfering with other cache values
- and flush the sysprefs cache without flushing all other values
To do so, we need to store different Koha::Cache objects at a package
level. That's why this patch adds a new Koha::Caches module.
FIXME: There is an architecture problem here: the L1 cache should be
defined in Koha::Cache
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
https://bugs.koha-community.org/show_bug.cgi?id=11921
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Several bugs have made changes to etc/SIPconfig.xml but not
updated debian/templates/SIPconfig.xml. This means that an admin
using the Debian packages who enables SIP2 for a site and looks at
/etc/koha/sites/<instance>/SIPconfig.xml will not see an up-to-date
version of that file, with the risk of missing possible config
opportunities.
Since debian/templates/SIPconfig.xml contains no placeholders or
other magic stuff related to the Debian packaging, this patch simply
copies etc/SIPconfig.xml to debian/templates/SIPconfig.xml
To test: diff etc/SIPconfig.xml debian/templates/SIPconfig.xml
There should be no difference between the files
Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The patch changes the sequence of cronjobs in the crontab example
file and in the cron.daily file of the packages.
This is why:
1) Renew automatically
... only when we can't renew, we want to
2) Calculate fines
... once the fine are calculated and charged
we can print the amount into the
3) Overdue notices
Before the change it could happen that you'd charge for an item,
that would then be renewed. Or that you'd try to print fine
amounts into the overdue notices, when they would only be
charged moments later.
To test:
- configure your system so you have items that should
- be charged with fines
- renew automatically
- configure your crontabs according to the example file
or switch the cron.daily in your package installation with
the new one
- configure your overdue notices so that one should be generated
<<items.fine>>
- Wait for the cronjobs or schedule them to run earlier
- Verify all is well and as it should be
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch adds a function to the koha-plack script so it checks for log file
existence and its permissions. This function is called from the start_plack function.
If some of this conditions are not fulfilled, it solves the situation by either
touching and/or changing the permissions accordingly for the instances' plack log files.
To test:
- Run (on kohadevbox):
$ cd kohaclone
$ debian/scripts/koha-plack --start kohadev
$ debian/scripts/koha-plack --stop kohadev
$ ls /var/log/koha/kohadev/plack*
- Verify ownership of the created files (they might belong to the root user)
- Apply the patch
- Run:
$ chown root:root /var/log/koha/kohadev/plack*
$ debian/scripts/koha-plack --start kohadev
$ ls /var/log/koha/kohadev/plack*
=> SUCCESS: Files belong to kohadev-koha:kohadev-koha
- Run:
$ debian/scripts/koha-plack --stop kohadev
$ rm /var/log/koha/kohadev/plack*
$ debian/scripts/koha-plack --start kohadev
$ ls /var/log/koha/kohadev/plack*
=> SUCCESS: Files are created and belong to kohadev-koha:kohadev-koha
- Sign off :-D
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch follows Galen's suggestion in comment #7.
TEST PLAN
---------
1) Back up your koha logs as desired.
2) add something to /var/log/koha/{instance name}/intranet-error.log
3) ps aux | grep zebra
4) logrotate -f /etc/logrotate.d/koha-common
5) ps aux | grep zebra
-- the zebrasrv and daemon process for zebra indexing
didn't restart.
6) apply this patch against /usr/sbin/koha-stop-zebra
7) sudo koha-start-zebra {instance name}
8) ps aux | grep zebra
-- the processes should have started up again.
9) add different junk to /var/log/koha/{instance name}/intranet-error.log
10) ps aux | grep zebra
11) logrotate -f /etc/logrotate.d/koha-common
12) ps aux | grep zebra
-- the process ids for the zebrasrv and daemon processes should
be different, but the number of processes is the same as before.
13) sign off, because its less ugly than comment #3
Sponsored-by: Tulong Aklatan
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Works as expected, no regressions found.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
ttf-dejavu was missing from the build dependencies.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Changing the package maintainer and removing a whitespace in debian/control.in.
Regenerated debian/control from that, which also adds libhtml-parser-perl because of bug 16971.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This has not been updated for a while. I plan to add the stable
releases.
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This makes debian/list-deps ready for Debian Jessie
and adds small fixes I already use for package releases.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch is the starting point for making the REST api available
on Plack.
What it does:
- It creates the /api/v1/app.pl mount point in plack.psgi
- It enables the ProxyPass and ProxyPassReverse directives so it
is reached through Plack.
- It sets rewrite rules so we can use the 'pretty' urls (i.e.
/api/v1/patrons instead of /api/v1/app.pl/api/v1/patrons).
To test:
- Grab the following files, and put them in /etc/koha (overwrite the existing ones)
debian/templates/apache-shared-intranet-plack.conf
debian/templates/apache-shared-opac-plack.conf
- Tweak your /etc/koha/sites/kohadev/plack.psgi file so the API-related stuff
is present on your file.
- Make sure Plack is enabled for the instance:
$ sudo koha-plack --enable kohadev
$ sudo koha-plack --restart kohadev
$ sudo service apache2 restart
- Follow the previous patch test plan, but use this URLs (no pretty URL):
http://localhost:8080/api/v1/app.pl/api/v1/patrons/50http://localhost:8081/api/v1/app.pl/api/v1/patrons/50
=> SUCCESS: You get a JSON response from the API [1]
- Not use this URLs:
http://localhost:8080/api/v1/patrons/50http://localhost:8081/api/v1/patrons/50
=> SUCCESS: You get a JSON response from the API [1]
- Sign off :-D
[1] this patch made a bug visible (the session is lost when accessing the API through
Plack) but it shouldn't prevent its inclusion because the API right now is not even available
as default for developers to test or fix it.
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch enables access to the REST API endpoint on packages setup.
It does so, by patching the shared apache-shared-intranet.conf and
apache-shared-opac.conf.
You can build your own master packages with this patch applied, or just:
- Grab
debian/templates/apache-shared-intranet.conf
debian/templates/apache-shared-opac.conf
and overwrite their counterparts in /etc/koha on a packages setup. For example
in kohadevbox.
- Have Koha loaded with all default data
- Create a superlibrarian user for you
- Login to the intranet and the OPAC
- Point your browser to:
http://localhost:8080/api/v1/patrons/51
=> SUCCESS: You get JSON data, for the patron you requested
http://localhost:8081/api/v1/patrons/51
=> SUCCESS: You get JSON data, for the patron you requested
- Sign off :-D
Note: I use the HTTPRequester addon for Firefox, re-using the CGISESSID value from the
browser session cookie, in the headers.
Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This adds a basetgz parameter to specify a pbuilder image.
I use this to build against different distributions.
This also updates the version number for master builds to 16.06.
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch just does that, and removes it from the comment on /etc/default/koha-common
To test:
- Apply the patch
- Run:
$ vagrant ssh ; cd kohaclone
$ sudo debian/scripts/koha-indexer --stop kohadev
$ sudo debian/scripts/koha-indexer --start kohadev
=> SUCCESS: Verify no warning is shown on the indexer-output.log file
- Sign off
https://bugs.koha-community.org/show_bug.cgi?id=16830
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>
A long-standing typo in our apache config files:
[intranet]/search refers to search.pl (which does not exist)
This patch refers it to catalogue/search.pl
Test plan:
Run an install or copy the change from apache-shared-intranet.conf or
koha-httpd.conf to your apache config. Restart Apache and check
if http://[your staff client]/search works.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Tested by making manual changes according to the patch. Did not test a
new installation.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 16190 enabled the indexer daemon by default for package installations.
This means that it is no longer necessary to set up koha-rebuild-zebra as
a cron job. This patch comments it out, so that people who might run into
bug 16814 can easily activate the cronjob again after de-activating the
indexer daemon.
To test:
Just read the diff and check that it makes sense.
Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This module is no longer in use and can be removed.
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
This part involves some changes in a bunch of mysterious debian|ubuntu
related files, not quite sure if I know what I'm doing
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Using Plack with the debian psgi file, I get lots of warnings like:
WARNING: Automatically converting Plack::App::CGIBin instance to a PSGI code reference. If you see this warning for each request, you probably need to explicitly call to_app() i.e. Plack::App::CGIBin->new(...)->to_app in your PSGI file.
This patch is aimed to eliminate the warns.
Test plan:
Run Plack with plack.psgi or koha.psgi and verify if you do not see these
warnings anymore.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
I tested on Jessie and I see no regressions.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch updates debian/control* to match what
was used for building the 16.05.00 packages, and includes
changes to:
- specify a floor for the Swagger2 version
- add dep on libio-socket-ip-perl, which is needed
for the package to work on Debian Wheezy
- suggest libwww-youtube-download-perl
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The goal of this patch is to avoid unecessary flush of the L1 cache on
creating a new CGI object each time C4::Languages::getlanguage is called
without a CGI object.
The new class Koha::Cache::Memory::Lite must be flushed by the CGI
constructor overide done in the psgi file. This new class will ease
caching of specific stuffs used by running script.
Test plan:
At the OPAC and the intranet interfaces:
Open 2 different browser session to simulate several users
- Clear the cookies of the browsers
- User 1 (U1) an User 2 (U2) should be set to the default language
(depending on the browser settings)
- U1 chooses another language
- U2 refreshes and the language used must be the default one
- U2 chooses a third language
- U1 refreshes and must be still using the one he has choosen.
Try to use a language which is not defined:
Add &language=es-ES (if es-ES is not translated) to the url, you should
not see the Spanish interface.
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@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>
On Debian Jessie, apt needs to be told it should get the dependencies
for the LE package from backports, or it will error. We check if we are
on Jessie and do that automatically so users don't need to set priorities
manually in apt.
Changed to lsb_release -c -s.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Temporarely set +e so the test for the LE package does not break
koha-create
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch makes koha-remove take care of
/etc/letsencrypt/renewal/$opacdomain.conf
/var/lib/koha/$site/letsencrypt.enabled
It also adds a few helper functions.
To test
- create a koha instance with LE
- observe you got both files mentioned above
- remove that instance
- verify the files are gone
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Deletes the --staging option of the letsencrypt command to get
real certificates. Rate limits apply.
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>
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 enables the indexer daemon by default on packages installs.
It does so by setting USE_INDEXER_DAEMON=yes on the /etc/default/koha-common
file. It does remove now irrelevant comments from that file.
This patch is straightforward to review. If is just a matter of choosing
to enable or not to enable by default.
Kind regards
PS: Let end users rejoice this so far hidden feature :-D
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher <bredan@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>
The other attachment was not a patch which could be applied by
'git bz'. This corrects that.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
debian/update-control will need to be run after this is applied, but
it works well
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
On log rotation Starman/Plack keeps failing (Auth.pm related problems) due to
permission issues:
Could not compile /usr/share/koha/opac/cgi-bin/opac/opac-search.pl: Can't locate Authen/CAS/Client/Response/Failure.pm
: ./Authen/CAS/Client/Response/Failure.pm: Permission denied at /usr/share/perl/5.20/base.pm line 97.
...propagated at /usr/share/perl/5.20/base.pm line 106.
BEGIN failed--compilation aborted at /usr/share/perl5/Authen/CAS/Client/Response.pm line 68.
Compilation failed in require at /usr/share/perl5/Authen/CAS/Client.pm line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Authen/CAS/Client.pm line 8.
Compilation failed in require at /usr/share/koha/lib/C4/Auth_with_cas.pm line 25.
BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Auth_with_cas.pm line 25.
Compilation failed in require at /usr/share/koha/lib/C4/Auth.pm line 63.
BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Auth.pm line 90.
Compilation failed in require at /usr/share/koha/opac/cgi-bin/opac/opac-search.pl line 34.
BEGIN failed--compilation aborted at /usr/share/koha/opac/cgi-bin/opac/opac-search.pl line 34.
As we do with zebra daemons, starman should be restarted as it doesn't handle log file rotation
gracefully[1].
I'm not sure how to reproduce it on a dev environment.
[1] https://github.com/miyagawa/Starman/issues/55
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This bug correctly inserts substitutions for this variable.
Four occurrences will now be changed. The line for log4perl.conf is now
correct, but the three other changes point to a location that does not
exist: /etc/koha/sites/$instance/zebradb.
That should just be: /etc/koha/zebradb.
All three cases concern the explain files.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
- Run koha-create to create an instance or just fire kohadevbox:ansible
=> FAIL: Notice the instance's koha-conf.xml points to __KOHA_CONF_DIR__
instead of /etc/koha/sites/kohadev/ on the log4perl entry.
=> FAIL: the /etc/koha/sites/kohadev/log4perl.conf contains __LOG_DIR__
instead of /var/log/koha/kohadev/
- Apply this patch and pick the koha-conf-site.xml.in and koha-create files
- Create a new instance
=> SUCCESS: All placeholders are filled correctly.
- Sign off
Regards
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
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
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
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.
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
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
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
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
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>
'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>
* 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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: upgraded DEBUG level to WARN in config file.
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
They were found and fixed using codespell.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
A trivial string patch to update the error message displayed to
user if koha-translate is used to attempt removal of a language
that is not installed.
Test plan
=========
1/ attempt to remove a non-existent language by
<installdir>/debian/scripts/koha-translate --remove <langcode>
2/ it should show "Error: the selected language is not already
installed."
3/ apply patch
4/ repeat step 1; it should show "Error: the selected language is
not installed."
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
If there are no instances already created on install/upgrade, the
koha-common.postinst script hungs in the absence of files to fix
and keeps waiting for user input.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patches the zebra configuration of existing Koha installations so
that their modulePath will work on newer Debian (and presumably Ubuntu)
releases.
Testing:
* Install a package built with this patch onto a system with instances
created by an older Koha version.
* Check that the files in /etc/koha/sites/*/zebra-*.cfg have the new
modulePath: directive rather than the old one.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This adds the full list of paths that debian might use for zebra to the
search path for modules.
It also means we can say we support s390x architecture. Whatever that is.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The debian/scripts/koha-translate script was still testing for the old naming
schema files. I also made sure all files are tested, to warn the user if
any of them is absent.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected. Tested both upgrading and on a new install.
Old versions of koha-common would put in a symlink to the system YUI
libraries. This causes upgrade problems, so we look out for that and zap
it if it's there.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
http://bugs.koha-community.org/show_bug.cgi?id=9987
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch makes the build script keep the shipped YUI JavaScript library
instead of explicitly deleting it and using the one the operating system
provides.
Development is done against the YUI library we ship, so this makes sense
even if Debian still shipped it.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
daemon uses by default /tmp/ for pid files, if they are unspecified.
Pass the right directory to daemon, so it knows where to put the pid file.
Signed-off-by: Attila Kinali <attila@kinali.ch>
TEST PLAN
---------
1) Roll a distribution and confirm it works.
OR
1) Hack all the /var directories to point to git directories
2) Add a dummy user for the instance name
3) sudo the script with the faked instance name.
-- the daemon should be running and the pid file should be in
the expected directory.
The first way is the proper way to test, I did the latter. :)
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The debian/build-git-snapshot script should not return success if an
error occurred.
Note that sys_command_output won't raise an error if something fails.
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Made a minor change to print the command, add a newline.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The only place python is used is in the debian/bd-to-depends script.
This patch rewrite this script using perl.
Test plan:
The execution of
debian/bd-to-depends
Should return the same output.
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Checked output, built a package, all is happy. Yay for no python!
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Currently koha-disable ONLY disables the instance in the apache conf
file. Presumably if you want to disable the instance, you also want
its processes to stop, so this patch will stop zebra, if running,
and SIP, if enabled.
Depends on Bug 13784.
To Test:
1) Have an enabled instance, with zebra and SIP running.
2) Run koha-disable INST. Note that after, both zebra and SIP
will still be running.
3) Re-enable INST.
4) Apply patch, and then copy debian/scripts/koha-disable to
package site, over /usr/sbin/koha-disable.
5) Run koha-disable INST. You should now see that both zebra
and SIP have been stopped.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Currently koha-stop-zebra will not stop zebra for disabled instances. It should
work more like koha-stop-sip, which does work for disabled instances. Also,
koha-stop-zebra is called by '/etc/init.d/koha-common stop' which clearly
should also apply to disabled instances.
To Test:
1) Disable a koha instance.
2) Run koha-stop-zebra INSTANCE. You should get message
"Instance INSTANCE disabled. No action taken."
3) Apply patch, and copy patched file debian/scripts/koha-stop-zebra
to package site over /usr/sbin/koha-stop-zebra.
4) Disable koha instance.
5) Run koha-stop-zebra INSTANCE. It should now stop zebra.
http://bugs.koha-community.org/show_bug.cgi?id=13784
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Due to a line in debian/rules, git-build-snapshot tries to delete a YUI-related
path that does not exist anymore (bug 13612 I guess). Build process ends with an error.
This patch deletes the line.
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
An incorrect conditional makes the indexer daemon fail to load.
To test:
- Enable the indexer daemon on packages [1]
- Restart koha-common:
$ service koha-common restart
- Run
$ ps waux | grep koha-indexer
=> FAIL: there's no reference to the rebuild_zebra.pl script
(line should look like *rebuild_zebra.pl -daemon*)
Run ps -ef | grep rebuild_zebra.pl too to make sure.
- Apply the patch, repeat the steps
=> SUCCESS: the rebuild_zebra.pl script is ran
- Sign off :-D
Thanks
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch corrects the call to 'basename' inside the script so it correctly
shows the language code when asked to list the available languages.
To test:
- On a packages install, run:
$ koha-translate --list --available
=> FAIL: It shows:
am-Ethi-opac-bootstrap.po
ar-Arab-opac-bootstrap.po
az-AZ-opac-bootstrap.po
be-BY-opac-bootstrap.po
ben-opac-bootstrap.po
...
- Apply the patch
- Copy the patched debian/scripts/koha-translate script to your packages setup.
- Run:
$ koha-translate --list --available
=> SUCCESS: It shows:
am-Ethi
ar-Arab
az-AZ
be-BY
ben
...
- Sign off :-D
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
With the fixing of the namespace in the SIP code, we don't need to
modify the PERL5LIB to have the old one.
To test:
* do a package install using this and the other patches on bug 7904
* enable SIP
* make sure koha-start-sip and koha-stop-sip work
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
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>
The memcache parameters aren't used by anything (except C4::SQLHelper,
but that's a cancer on the face of the earth) anymore, so they can go.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
To test:
1- Build new koha packages
2- Check that the conflist file contains the changes we have made
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Prior to this patch, the koha packages depended on mysql-client. This
meant that it was tricky to use things such as the MariaDB libraries
instead.
This patch recommends mysql, but will accept mariadb and other things
that are marked by debian as able to replace mysql.
Signed-off-by: wajasu <matted@34813.mypacks.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
To test:
Package up a branch with this patch
install that package
create a site - sudo koha-create --create-db testdisable
enable a site - sudo koha-enable testdisable
check it's enabled - sudo koha-list --enabled
* it should show up
disable a site - sudo koha-disable testdisable
Do this for both debian squeeze/wheezy and ubuntu 12.04 and 14.04, if you can. I'd like to see a sign off from a debian (sq/wh)eez(e/y) or ubuntu 12 user, because I could only test reliably on ubuntu 14.04.
* make sure apache restarts and no errors are produced
check it's disabled - sudo koha-list --enabled
* it should not show up
check the site is still there - sudo koha-list
* it should still be there
check that the config file has the Include for disabling uncommented
* the line Include /etc/koha/apache-shared-disable.conf should not have a # in front.
Re-enable the site - sudo koha-enable testdisable
* the line Include /etc/koha/apache-shared-disable.conf should have a # in front.
And the final question - does the site work? All other functions unchanged?
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected. code reads better too.
Edit: I added a missing space in one line.
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>
To test:
* Build a package and install it, and verify that there are no errors.
* Play around with koha-translate, listing, adding, and removing
languages.
Note: one reference to prog and ccsr remains in koha-translate. This is
to allow it to remove any pre-existing translations on an upgrade.
Note 2: prog translations are still being installed, I think this is due
to the underlying translation system doing it.
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
To test...
- apply patch
- build and install a new Koha .deb from patched codebase
- create a new Koha instance
- add some authority records to instance
- do a full zebra reindex
- do an authorities search, and get some results
note: this patch does not fix existing Koha instances, just new ones
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The itype facet was missing 952$y for both MARC21 and NORMARC.
This patch adds that. And also modifies the zebra-biblios-dom.cfg file
(also the debian/ version) so facetNumRecs is set to 1000 for zebra.
It is the amount of records that are taken into account. The more record,
the more exact the facets for the result set. 1000 was chosen as it changed
the time to reindex 1000 records from 18s to 19s.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch adds a variable to koha-conf.xml controlling the use of Zebra facets.
Usage:
- use_zebra_facets = 1 | 0
Zebra facets work only on DOM.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch changes koha-indexdefs-to-zebra.xsl to correctly process a new syntax
for defining facet indexes on the XML files.
It also changes the retrieval file to allow access to Zebra's internal data from
Zoom (i.e. access to zebra::facet:*).
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: David Cook <dcook@prosentient.com.au>
Seems to work with DOM and MARC21.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Since nobody is currently working on the zebra layer introduced by bug
8233, Solr won't never work.
Some code has been introduced in 3.10 to prove several search engines
can cohabit into Koha but no help/fund has been found to go ahead.
It is useless to keep this code and to maintain an ambiguous situation.
I think the indexes configuration page could be restore later if someone
else introduces a new search engine into Koha.
Test plan:
Look at the code introduced by bug 8233 and verify all is removed.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This patch adds a new cron script automatic_renewals.pl and a new
entry in crontab.example.
To test:
1) You need a few issues, some with automatic renewal and some without.
2) Confirm that each time you run misc/cronjobs/automatic_renewals.pl
those issues are renewed that meet all of the following criteria:
- automatic renewal has been scheduled either by issuing rule or by
checkbox on the checkout page
- the number of allowed renewals isn't exceeded
- renewal isn't premature (No renewal before)
3) Confirm that all other issues are not affected.
Sponsored-by: Hochschule für Gesundheit (hsg), Germany
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
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>
Modified debian/koha-common.cron.daily adding instance output dir option to
the fines.pl entry as described in the ticket.
Requires patch from Bug 8566 which provides the __instancename__ feature for
koha-foreach.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
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>
Test plan:
* Go to http://library/opac-tmpl and check you get a 403 error instead
of a directory listing.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The OverDrive integration needs to connect to an authentication server
over HTTPS, and many systems do not install the necessary module
(LWP::Protocol::https) by default.
Test plan (for patch):
1) Run koha_perl_deps.pl -a, verify that LWP::Protocol::https appears in
listing.
Test plan (to verify that LWP::Protocol::https is necessary, needs OverDrive access):
1) Remove LWP::Protocol::https (liblwp-protocol-https-perl under Debian).
2) Run an OverDrive search on the OPAC, it should fail.
3) Reinstall LWP::Protocol::https.
4) Rerun OverDrive search, it should now succeed.
Note: older versions of Debian do not need to install LWP::Protocol::https separately;
the Debian scripts have been updated to reflect this divide.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
As the way we need to reference Apache instance names has now changed
between 2.2 and 2.4, we need to try it out both ways to make sure we get
it right.
This also allows koha-create/koha-disable to try the .conf version of
the name if the first one doesn't work.
To test:
* Create an instance on an Apache 2.2 system with koha < 3.16
* Upgrade to 3.16 with this patch, saying 'yes' to the renaming question
** Make sure you don't see the warning: Warning: problem enabling $site
in Apache
* Do a 'service apache2 restart'
* Make sure you can still access the instance
* Make sure that /etc/apache2/sites-enabled/instance.conf exists as a link
to /etc/apache2/sites-available/instance.conf
* Check that koha-create and koha-remove behave like you'd expect.
Note:
* If you need to make debconf forget that it asked you the question
about renaming so that it'll do it again, then run:
echo "unregister koha-common/rename-apache-vhost-files" | sudo debconf-communicate koha-common
* 'debconf-show koha-common' will show you the current debconf
configuration.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
There's no point asking the user if they want their Apache Koha
configuration updated if there's no configuration needing updated.
This also fixes a case where the updating would have failed when running
on Apache 2.4.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
I agree with adding that checks, and the conditions rewrite seems cleaner
than my first approach. So, I sign it.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch makes the install scripts take care of the new file
and prompt for user confirmation on the apache file renaming step.
Both prompt and the renaming actions depend on the fact that there
are instances with their files missing the .conf appendix.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
As asked by Robin, a bash lib of functions is introduced with the common
functions to be reused. Most of the scripts are modified (reduced) to
include this file and the repeated functions cleaned.
No noticeable change in behaviour should be noticed.
As I've been todl in #debian-mentors, it is used that files for inclusion
should be installed at the apps directory (i.e. /usr/share/koha/) so this
patch makes the install script put the file in the bin/ directory.
All koha-* scripts assume the file is there already (and fail otherwise).
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Apache 2.4 expects the sites definition files use the sufix '.conf'
To reproduce:
- Install the 'koha-common' package on Debian 7 or Ubuntu 13.10+
(both known to include Apache 2.4).
- Create an instance (for example testlibrary) using the supplied
commands:
$ koha-create --create-db testlibrary
> FAIL: apache reports an error like this:
"ERROR: Site testlibrary does not exist!"
This patch adds a test on the Apache version and appends the ".conf"
sufix if needed.
To test:
1st step: koha-create gets fixed:
-- The hard way --
- Apply the patch, and build the koha-common package on top of this
commit.
- Install the built package on an Apache 2.4 Debian-based distro (Debian 7
or Ubuntu 13.10 will work)
- Create a test instance:
$ koha-create --create-db testlibrary
> SUCCESS: no more apache sites related error.
-- The easy way --
- Apply the patch, and copy the koha-create into an Apache 2.4
Debian-based distro
- Create a test instance using the koha-create script you just
copied:
$ ./koha-create --create-db testlibrary
> SUCCESS: no more apache sites related error.
2nd step: the rest of the touched scripts keep working as usual
koha-disable
koha-dump
koha-enable
koha-list
koha-remove
koha-restart-zebra
koha-stop-zebra
koha-start-zebra
They should all keep working. Can be tested "the easy way" too.
Note: there might be another issues regarding Apache 2.4 deployments
like the need for
$ a2enmod access_compat
and perhaps some directory permissions tweak, which I think should be
properly documented on the install instructions.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
A run of update-control, adding bash-completion as a build-time
dependency, allowing update-control to ignore anything that doesn't
have a package but isn't marked as "required" by Koha, added
dependencies that we don't use but is needed by something we do use.
All fairly mundane.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
ttf-dejavu (i.e., the core and extra DejaVu TrueType) fonts
are used by the proposed fix for bug 8375.
To test, build and install the Koha packages for Debian
and verify that the ttf-dejavu package is installed.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch implements bash-completion for the following commands:
- koha-list
- koha-enable
- koha-disable
- koha-email-enable
- koha-email-disable
- koha-enable-sip
- koha-start-sip
- koha-restart-sip
- koha-stop-sip
- koha-start-zebra
- koha-stop-zebra
- koha-restart-zebra
It is implemented in a way that it removes already used or mutually
exclusive parameters (instance names, option switches).
I already have written completion for other (more complex) commands,
but I belive a simpler patch is better to start with.
IMPORTANT: this patch relies on having the koha-list command available
in the path.
To test:
- Make sure you have bash-completion installed and enabled (IRC might
help us if you encounter problems).
- Apply the patch.
Option 1:
- Pick the debian/koha-common.bash-completion file and do
$ cp debian/koha-common.bash-completion /etc/bash_completion.d/koha-common
- Open a new bash shell (I do it opening a new terminal on my Ubuntu box).
- Type one of the listed commands...
And repeatedly press <TAB>.
- Enjoy, and signoff if you belive it is usable. Otherwise report back.
Option 2:
- run:
$ . debian/koha-common.bash-completion
- Type one of the listed commands...
And repeatedly press <TAB>.
- Enjoy, and signoff if you belive it is usable. Otherwise report back.
Tests:
- Some koha-list option switches are mutually exclusive, -h should be
available in any context
- koha-enable should only autocomplete disabled instances
- koha-disable should only autocomplete enabled instances
- koha-email-enable should only autocomplete email-disabled instances
- koha-email-disable should only autocomplete email-enabled instances
- koha-*-zebra scripts should only autocomplete enabled instances.
- koha-*-sip scripts should only autocomplete sip-enabled instances.
Regards
To+
Note: writing bash-completion routines is a bit hacky, I tried to make
it the simplest way I could. Your comments are welcome.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
As noted by Robin, STDOUT is used by the script to communicate with
debconf and, hence, the warning messages should be directed to STDERR.
This patch does that. To test:
- Set AUTOMATIC_TRANSLATIONS_UPDATE="no" so the warning normally shows
- Redirect STDOUT to /dev/null:
dpkg -i koha-common...deb > /dev/null
=> Warning message doesn't show (i.e. it is sent to STDOUT)
- Apply the patch, rebuild package
- Redirect STDOUT to /dev/null:
dpkg -i koha-common...deb > /dev/null
=> Warning message shows (i.e. is correctly sent to STDERR)
- Redirect STDERR to /dev/null:
dpkg -i koha-common...deb 2> /dev/null
=> Warning message doesn't show
- Verify that previous tests pass
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This causes a question to be asked at installation time as to whether
translations should be updated or not. The answer is written to the
config file, and stored in debconf. Effort is taken to ensure that if
the admin changes the config file, the update will be picked up and
reflected in debconf (i.e. that the admin's decision is always the
correct one.)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Fixed two typos that made it fail and it worked like a charm.
Tested like this:
- Install the package
=> no errors, the file is created, defaults to 'yes'
- Install a language (koha-translate --install es-ES)
- Re-install the package (simulating an upgrade)
=> es-ES gets updated
- Set preference to 'no'
- Re-install
=> es-ES doesn't get updated, the warning is printed correctly
- Installed a second language (koha-translate --install pt-BR)
- did all the tests again
=> Success
Note: on master there are obvious template translation warnings.
A copy of the generated package can be grabbed from:
http://es.koha-community.org/koha-common_3.15+20140312172225.af7c0a23_all.deb
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch makes AUTOMATIC_TRANSLATIONS_UPDATE default to yes,
meaning that package upgrades will update the translations by
default. This seems definitely sensible for new installations,
but as there are some older installations that may be in the
habit directly editing generated translated templates, it's
less clear whether this is a good idea for upgrades.
This patch is intentionally separate, and can be ignored if
the consensus swings towards having AUTOMATIC_TRANSLATIONS_UPDATE
be off even for new installations or if somebody counter-patches
with adding debconf support.
To test:
- As with the previous patches in the series, except that the
translations would be automatically updated upon installing
the new package.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch creates a new master configuration file for the
koha-common package, and moves the AUTOMATIC_TRANSLATIONS_UPDATE
variable rather than leaving in in /etc/default/koha, which is meant
to be used for init script settings.
The configuration format is simple - a shell script that
sets variables and which can sourced by another script or
trivially parsed.
To test:
- Apply the patch series for bug 10942 and build a package.
- Install the package.
- Verify that a new config file, /etc/koha/koha-common.conf.
- Follow the rest of the test plan for the main page (e.g.,
set AUTOMATIC_TRANSLATIONS_UPDATE and force a package upgrade).
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch adds a new config variable AUTOMATIC_TRANSLATIONS_UPDATE at
/etc/default/koha-common that is used to control whether the upgrade
process should trigger a
$ koha-translate --update <lang_code>
command for each installed template translation language.
To test:
- Have a koha-common setup with some languages installed
(e.g. koha-translate --install es-ES)
- Apply the patch and build a package for it.
- Install it.
- A new AUTOMATIC_TRANSLATIONS_UPDATE config variable should be in place
at /etc/default/koha-common
- Set AUTOMATIC_TRANSLATIONS_UPDATE to 'yes'
- Re-install the package to trigger the post-install script
- Verify that translations get updated.
Edit: added a warning message for the case AUTOMATIC_TRANSLATIONS_UPDATE=no
and there are translations installed (so they need to get updated).
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Works as advertised, default behaviour doesn't change.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
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>
The sharedate column is documented as having the following meaning:
"date of invitation or acceptance of invitation"
This patch adjust the new list-sharing code to stick with that
interpretation, as otherwise the column should have been renamed
to 'invite_expiration_date' or the like.
It also removes the "housekeeping" functionality from AddShare, as
otherwise the routine should have been named AddShareAndDoOtherStuff.
To prevent list shares from piling up, a new --list-invites flag
has been added to cleanup_database.pl. The default crontabs have
been modified to use the --list-invites flag by default.
To test
-------
[1] Make some list share invites and accept some, but now all of them.
[2] Wait 14 days (or more reasonably, manually edit the sharedate
values for the unaccepted shares to put them at least 14 days in the
past.).
[3] Run cleanup_database.pl --list-invites
[4] Verify that accepted shares remain, as to share invites that have
not yet reached more than 14 days of age.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Not strictly necessary, but for as long as both debian/control and
debian/control.in are stored in the repo...
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch adds a sample koha-sites.conf file, which will be
included by the koha-common package in /etc/koha (where it belongs).
It is fixed to include the current defaults (DOM indexing for both
biblios and authorities, disabled use of memcached, and good defaults
for a normal setup if enabled).
All options are commented for ease of use by average users.
To test
- verify that the defaults are sane (let me know if it needs to be
fixed).
- build the package and verify that the file gets installed.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch adds locking to rebuild_zebra.pl to ensure that simultaneous
changes are prevented (as one is likely to overwrite the other).
Incremental updates in daemon mode will skipped if the lock is busy
and they will be picked up on the next pass. Non-daemon mode
invocations will also exit immediately if they cannot get the lock
unless the new flag -wait-for-lock is specified, in which case they
will wait until the get the lock and then proceed.
Supporting changes made to Makefile.PL and templates for the new
locking directory (paralleling the other zebra lock directories).
We stash the zebra_lockdir in koha-conf.xml so rebuild_zebra.pl
can find it.
To address earlier QA concerns we:
1. added code to check if flock is available and ignore locking if
it's missing (from M. de Rooy)
2. changed default for adhoc invocations to abort if they cannot
obtain the lock. Added option -wait-for-lock if the user prefers
to wait until the lock is free, and then continue processing.
3. added missing entry to t/db_dependent/zebra_config.pl
4. added a fallback locking directory of /tmp
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Doug merged the original patch with the QA changes.
Just for the record, noting here that the original patch was tested
extensively too by Martin Renvoize.
I have added a followup for some exceptional cases.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The last use of the POE family of Perl modules went away with
the removal of zebraqueue_daemon.pl per bug 9001. Consequently,
this patch removes POE as a dependency.
To test:
[1] Verify that "git grep POE" and "git grep libpoe" report
nothing.
[2] Verify that koha_perl_deps.pl -a does not report POE
as a dependency.
[3] (extra credit) verify that Debian packages can be built
that do not list libpoe-perl as a dependency.
This patch also updates some distro-specific installation
instructions and scripts, but makes no representations about
whether those instructions currently work.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
While adding the --help and -h switches I forgot to change to arguments
count validation so that one can actually use those parameters (i.e.
koha-create should accept being invoked with only one parameter).
This patch just changes the minimum parateres required from 2 to 1.
To reproduce:
- Run 'koha-create --help' from master
=> Usage information is printed BUT ALSO an "Error: wrong parameters"
message
- Apply the patch and
- Run 'koha-create --help'
=> Usage informatio it printed and no error message.
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
'en' is not a translation and it doesn't make any sense to return it as
part of the installed translations or the available ones.
It becomes relevant to remove it as users upgrading their installed
translations end up grepping the output to remove 'en' like in:
for lang in $(koha-translate --list | grep -v -x -e 'en') ; do
koha-translate --update $lang
done
instead of simply issuing the koha-translate --list command.
To test:
- Run
./koha-translate --list
./koha-translate --list --available
=> It shouldn't return 'en' in the result list.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
To test:
Install the packages with this patch, observe the /etc/cron.daily/koha-common
file - auto_unsuspend_holds should now be in the default list.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The -v and --verbose option switches add the --verbose switch to the
misc/translator/translate script call in the packages' 'koha-translate'
command.
The docs are updated accordingly.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as expected with and without -v. Man page looks good.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch makes koha-create print better and more descriptive usage
information. Also adds the --help and -h switches.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Removed trailing " from:
$scriptname [db usage mode] [options] instancename"
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The koha-translate's usage message has a couple of inconsistencies:
'--all' should be '--available'
and '--help' is missing from the usage examples.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, tested using instructions on
http://wiki.koha-community.org/wiki/Testing_man_pages
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Koha requires mod_rewrite. If it's not enabled in Apache, then
koha-create will now abort with a helpful error message. Also adds a
warning when not run as root to avoid confusing errors.
Test plan:
* apply the patch
* a2dismod rewrite
* run koha-create without sudo, note the error about being root
* run koha-create with sudo, note the error about rewrite
* a2enmod rewrute
* repeat test above, note that it works
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Works as expected.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Trivial patch to add 'cron-daemon' as dependency for the koha-common
package. 'cron' is usually pulled in any minimal Ubuntu/Debian
install, but in some circumstances (using debootstrap) it might be
absent.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
No entry in debian/control yet, but
according to comments in the file this file is generated
from control.in - so this should be ok.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Older versions of Koha didn't have <backupdir>...</backupdir> defined in
koha-conf.xml. The koha-dump script is aware of this, and checks to see
if it's there. However, if it's not, xmlstarlet returns a non-0 error
code which causes the script to abort due to running under set -e.
Test plan:
* Remove backupdir from koha-conf.xml
* Run koha-dump, notice that it doesn't do backups
* Apply patch
* Run koha-dump again, notice that it does do backups
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
The fallback method works as described. It might be made more robust
like checking for dir existence (thinking of older instances upgrades).
But it certainly belongs to another bug report.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
As Tomas said, it would be better to alert the user if the backupdir tag
does not exist (or contains a nonexistent directory) in the config file.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
If koha-common is started when Zebra log files are owned by root
it will fail to start without any useful message (since Zebra can't
write errors in log files because it lacks permissions to do so).
This patch creates empty log files and ensure they have correct
permissions.
I can't pin-point why log files gets owned root, but I suspect it
has something to do with Zebra crashing and logrotate, but this is
just theory. We have seen this behaviour since koha 3.1 every
few months, and every time it happends we have root owned logs and
crashed Zebra so this patch will at least help sites which have
some kind of automatic koha-common start if it's not running.
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
As configuration variables from koha-sites.conf overwrite the ones in the
koha-create script we need to unset them in case we have USE_MEMCACHED="no".
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch makes the koha-create script adjust the koha-conf.xml file
with the proper string substitutions to enable the use of memcached
for the created Koha instance.
It adds three option switches that control this:
--use-memcached (defaults to "no")
--memcached-servers "host1:port1,..." (defaults to '127.0.0.1:11211')
--memcached-prefix "desired_namespace prefix" (defaults to 'koha_')
It respects the current schema configuration schema, where configuration
values are pondered like this:
hardcoded < koha-sites.conf < koha-create option switches
koha-sites.conf is read for USE_MEMCACHED, MEMCACHED_SERVERS and
MEMCACHED_PREFIX.
Note: the docs discourage setting user's own namespace prefix.
Using memcached is off as the default. The relevant configuration
variables will remain empty if the user doesn't pass --use-memcached
to the command. It matches the current behaviour.
To test:
- Apply the patch
- Build your own packages and install them on a test server
a) Create a new instance without using the new switches like:
$ koha-create --create-db memctest
- Check that /etc/koha/sites/memctest/koha-conf.xml contains:
* Empty <memcached_servers> tag.
* Empty <memcached_namespace> tag.
b) Play with the possible combination of option switches
(Note that the code defaults to empty and will remain like that if
--use-memcached is not used, so less tests...)
$ koha-create --create-db --use-memcached memctest
$ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" memctest
$ koha-create --create-db --use-memcached --memcached-servers "anything:xxx" --memcached-prefix "something" memctest
$ koha-create --create-db --use-memcached --memcached-prefix "something" memctest
- Check the koha-conf.xml and /etc/apache2/sites-enabled/memctest
file reflect the chosen options.
c) Run
$ koha-create --help
- It should advertise this addition accordingly.
d) Run
$ man koha-create
- Man page for koha-create should provide good information on the new
switches behaviour
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Adds 'memcached' to the control.in file so the user is suggested by apt
to install it.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
* Added base class files for all tables in koha using
DBIx::Class::Schema::Loader.
* Added a (very basic) test file for C4::Context
* Also added dependencies in required files.
To Test:
[1] Install patch
[2] Make sure you can still connect to Koha
[3] You may optionally run this test script:
use Koha::Database;
use Data::Dumper;
my $db = Koha::Database->new();
my $schema = $db->schema();
print Dumper($schema->resultset("Borrower"));
If you run this file you should get a DBIx dump of the borrowers table.
Signed-off-by: wajasu <matted-34813@mypacks.net>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch makes the init script return the status of the relevant
processes.
To test:
- Apply the patch, build package and install
- Run
$ service koha-common status
Note: it can be tested just copying the debian/koha-common.init script
to a server running koha-common instances and calling it
$ ./koha-common.init status
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The original patch for bug 10622 added the --sip, --nosip and
--help switches to the koha-list command, but did not update the
manpage for the command. This patch does.
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-list.xml
$ man -l koha-list.8
Make sure this test passes:
$ prove -v xt/verify-debian-docbook.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Forgot the docs this time, good catch Magnus
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Just added those switches.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
I applied the patch on my local dev install, and then copied the
patched koha-list script to a couple of servers with actual
instances running off the packages, to test the script.
- It seems that the -h switch did not work before this patch, now
both -h and --help works nicely
- --sip and --nosip work as expected, also in combination with
--email and --noemail
The patch does not add --sip and --nosip to the man page for
koha-list, but I will do a followup for that.
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Removed unused stuff, added a new config file /etc/default/koha-common
to control the init script behaviour. Currently is only a stub. The config
file could be put on /etc/sysconfig on RedHat and friends. The init script
should work them too. Added a TODO comment regarding the 'status' switch.
To test:
- Apply the patch on master, build your own packages and install.
- The init script should continue to work as expected.
(it can be tested replacing the /etc/init.d/koha-common file with
debian/koha-common.init on a packages install).
- The absence of the /etc/default/koha-common file should not prevent
the init script from working.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
While bug 8911 fixed a problem regarding history.txt, a proper fix for
packages was missing.
This patch does three things:
- Adds docs/history.txt to debian/koha-common.docs so it gets installed.
- Moves the line installing the release notes from debian/koha-common.install
to debian/koha-common.docs.
- Adds an override_dh_compress entry in debian/rules that excludes
history.txt from the dh_compress routine [1]
To test:
- Take a picture of how /usr/share/doc/koha-common looks.
- Apply the patch and build a package.
- Upgrade and/or install using your package.
- Look for the contents of the /usr/share/doc/koha-common, it should
look the same, but history.txt must be there.
- More > About Koha > Koha Timeline should show the history lines.
[1] As 'man dh_compress' says, it is needed as every file considered for
the doc dir that is plain text and is more than 4k size will be
gzipped unless stated otherwise. We need it uncompressed for about.pl.
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
New installs get the message about running a script if upgrading from
3.2. They shouldn't. This silences this message in all cases except when
you actually are upgrading from 3.2.
Test plan:
There are three scenarios to test:
1) A fresh install should not cause the prompt.
2) An upgrade with or without the debconf entry set should not cause the
prompt.
3) An upgrade from a 3.2 release to this should cause the prompt.
To remove the debconf entry that says the prompt has been seen:
echo 'unregister koha-common/3.2-3.4-upgrade-notice' | sudo debconf-communicate koha-common
This should be run before every test to make debconf forget that it's
shown the prompt. To get its current state:
sudo debconf-show koha-common
To test against the 3.2 version, an empty package that claims to be Koha
3.2.2 is attached to the bug.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
It might not be immediately obvious that it is possible to send
SQL queries "directly" to the koha-mysql command, or that files
from mysqldump can be loaded with it. This patch adds these as
"example usage" to the man page for koha-mysql.
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-mysql.xml
$ man -l koha-mysql.8
Make sure this test passes:
$ prove -v xt/verify-debian-docbook.t
This patch also corrects a couple places where "Koha" was written as "koha".
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Test plan, all tests and QA script pass.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
There were some missing zebra language options in the man page for koha-create.
Trivial string change.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested using the following commands:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
debian/docs/koha-list.xml
$ man -l koha-list.8
Also:
prove -v xt/verify-debian-docbook.t
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Fixed the path to __ZEBRA_BIBLIOS_CFG__ for <server id="mergeserver">
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Good catach drojf.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch makes the koha-create script install the file zebra-biblios-dom.cfg
with the proper string substitutions inside on the new instance koha-conf.xml file.
It also adds two option switches that control the indexing mode for the instance:
--biblio-idx {dom|grs1}
--auth-idx {dom|grs1}
DOM indexing is set as the default for both authorities and bibliographic records.
Following drojf (thanks!) advice I arranged stuff like explained here:
http://wiki.koha-community.org/wiki/Switching_to_dom_indexing
To test:
- Apply the patch
- Build your own packages and install them on a test server
a) Create a new instance without using the new switches like:
$ koha-create --create-db domtest
- Check there's a file /etc/koha/sites/domtest/zebra-biblios-dom.cfg
- Check that /etc/koha/sites/domtest/koha-conf.xml points to:
* zebra-biblios-dom.cfg (biblioserver section)
* zebra-biblios-dom.cfg (publicserver section)
* zebra-authorities-dom.cfg (authorityserver section)
- Success means the new default is DOM
b) Play with the 4 possible combination of option switches
$ koha-create --create-db --auth-idx grs1 --biblio-idx grs1 domtest
$ koha-create --create-db --auth-idx grs1 --biblio-idx dom domtest
$ koha-create --create-db --auth-idx dom --biblio-idx grs1 domtest
$ koha-create --create-db --auth-idx dom --biblio-idx dom domtest
- Check the koha-conf.xml file reflects the chosen options.
c) Run
$ koha-create --help
- It should advertise this addition accordingly.
d) Run
$ man koha-create
- Man page for koha-create should provide good information on the new switches behaviour
Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch makes Makefile.PL put the history.txt file in the right places
depending on the chosen setup layout, adds a reference to that place in
koha-conf.xml (and debian template version), and finally tweaks about.pl to
use it.
To test, apply the patch and verify that perl Makefile.PL runs fine, and
installing in
- dev
- single
- standard
layouts works as expected. Then go to the about.pl page and see if Koha's
history shows there.
Then, build your packages and test on your newly created instances.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This adds caching directives to the static resources so that the browser
doesn't ask about them all the time.
By default, Debian apache doesn't have the required module (mod_expires)
enabled, and so this patch will have no effect. In order to enable this
function, run:
a2enmod expires
and restart apache.
Test Plan:
* Using firebug or equivalent, load a page.
* Note that none of the images, css, or js files have a Cache-Control or
Expires header set.
* Add this patch, redeploy the package with it (or overwrite the
apache-share.conf file) enable the 'expires' module, restart apache.
* Force-reload the page
* Note that the images, css, js now have Cache-Control and Expires set
for 12 hours into the future.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch add the option to choose 'ru' and 'uk' during install for Zebra.
Should work for a tarball install, and make 'ru' and 'uk' available for using
with koha-create too.
Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Reran Makefile.pl and made sure the language options show up now.
Patch extends existing language code lists addings nb, ru and uk
where missing.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This patch provides a definition file for Spanish (es) character
sorting in Zebra. It is based on the ideas from Hugo Agud <hagud@orex.es>
and Pablo Bianchi <pablo.bianchi@gmail.com>.
Makefile.PL is fixed to notice the existence of the 'es' language. The
docs for koha-create are touched too.
To test:
Tarball
=======
- Go through the install process, choosing 'es' for the Zebra's language step
- Koha should work as usual.
- Running this should show the lang definition is properly set.
$ grep -R "lang_defs/es" /etc/koha/*
(stuff like zebradb/zebra-biblios-dom.cfg:profilePath:...etc/koha/zebra/lang_defs/es... should show)
- This file should be present:
/etc/koha/zebradb/lang_defs/es/sort-string-utf.chr
Packages
========
- Build your own package, it shouldn't break the packaging
- Try the new package, using koha-create to set an instance using --lang 'es'
Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
The first patch on this bug forgot to add the new -q option to
koha-rebuild-zebra to the man page for that command. This patch
fixes it.
To test, run something like these commands:
$ xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl \
debian/docs/koha-rebuild-zebra.xml
$ man -l koha-rebuild-zebra.8
This should display the man page. (Remember to remove koha-rebuild-zebra.8
when you are done :-)
$ prove xt/verify-debian-docbook.t
All tests should pass.
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This adds a -q option to koha-rebuild-zebra that prevents it outputting
help if no instances are provided on the command line. This means that
if you've just installed the package, you won't get messages from cron
telling you how to use the script.
Test plan:
* install koha-common 3.12 or master onto a system with no enabled
instances.
* note that you or the sysadmin will start getting emails every 5
minutes.
* replace /etc/cron.d/koha-common and /usr/sbin/koha-rebuild-zebra with
the versions from this patch.
* note that the emails stop flowing.
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
"sudo koha-rebuild-zebra -q" gives no output, as expected.
Followed the test plan, all looks good.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
1) koha-create: fill in __PLUGINS_DIR__
2) koha-create-dirs: create the directory, set permissions (writeable by the koha user)
Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This updates the control file to use tinymce rather than tinymce2, as
tinymce2 is deprecated and no longer in Debian.
Also a general dependencies update. Note that this is suitable for
master only.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Commented out the code that checks for intance name parameters on the zebra service handling scripts.
It restores the original behaviour, while leaving error checking code.
Regards
To+
Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>