According to the list of two-letter language codes found in ISO 639-1
(https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), the correct
Zebra language option for Greek should be 'el', not 'gr'.
This patch fixes that.
Test plan:
0) Apply the patch.
1) Confirm that 'gr' has been changed to 'el' in all relevant files.
2) Create a new Koha instance using `koha-create --zebralang el testinst1`.
3) Edit /etc/koha/koha-sites.conf and set ZEBRA_LANGUAGE to 'el'. Then,
create another Koha instance with `koha-create testinst2`.
4) Confirm that both instances created in steps 2) and 3) have picked up
the Zebra CHR file from the /etc/koha/zebradb/lang_defs/el/ directory.
This is done by inspecting the value of 'profilePath' in these files:
/etc/koha/sites/testinst{1,2}/zebra-authorities-dom.cfg
/etc/koha/sites/testinst{1,2}/zebra-biblios-dom.cfg
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Same as previous test, but use the script to run the reindex
reset_all to update the scripts or use
misc4dev/cp_debian_files.pl
sudo koha-elasticsearch --rebuild -r -v
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
As a simple alternative to the solution in bug 9949 or just as an
additional measure, this patch adds a rewrite rule for intranet
in order to intercept potential misuse of perl scripts that could be
reached on a dev package install via the cgi-bin/koha scriptalias.
It simply rewrites them to the nonexistent "notfound", resulting in a
regular 404 error.
The rewrite rule does not harm regular installs and is just a little extra
step in securing a dev install. You should have more security measures in
place to secure your staff client.
QA Note: Although a rewrite rule may not be our first choice, this one
rule is more elegant and easier to maintain than e.g. a whole bunch of
aliases.
Note: This patch should have a regular and a dev install signoff.
Test plan:
[1] Make sure that this rewrite rule is inserted in your actual apache
config via /etc/koha/apache-shared-intranet.conf. Restart Apache.
[2] For regular package installs:
Try one of the URLs in step 3.
Verify that your staff client still operates as usual. Test a few
URLs inside some modules.
[3] For dev installs:
Try some URLs like below.
Expect 404 errors only, not 500s. If you do not see a 404, go back!
/misc/stage_file.pl
/t/db_dependent/default_search_class.pl
/installer/data/mysql/updatedatabase.pl
/Makefile.PL
[4] Do you see an additional directory to add to the regex? Please report.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
When languages are added or removed when need to flush the caches to
keep the interface consistent
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Aparently ((i++)) isn't portable, changed for an admittedly uglier
but functional increment.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Sometimes doing koha-sip --restart instance happens too fast and
the SIP server is not started.
To test:
- have SIP enabled and running for your instance
- issue a restart, make sure it restarts
sudo koha-sip --restart inst
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Now koha-common.postinst has a way to patch log4perl configs on
instances, we should patch the Z3950 responder config accordingly,
before it is backported to 19.11 or the 20.05 release :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
No more wide characters in print when logging to a file with Koha::Logger.
Test with this string
"♯Turpo :"
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch makes koha-common.postinst check if the log4perl.conf files
on the instances need tweaking. If they do, it appends the relevant
configuration text.
To test:
1. Install Koha 19.11 or earlier using the packages
2. Create an instance:
$ koha-create --create-db test1
$ koha-create --create-db test2
=> FAIL: /etc/koha/sites/test1/log4perl.conf doesn't include an entry for
z39.50
3. Apply this patch and run:
$ docker run \
--volume=/path/to/your/clone:/koha \
--volume=/dest/path/for/debs:/debs \
--privileged
--env VERSION=19.12.00.047 \
koha/koha-dpkg:master
Note: Paths need to be adjusted
4. Grab the .deb files and put them on the machine you're testing this
5. Edit /etc/koha/sites/test2/log4perl.conf and add the following text
at the bottom: log4perl.logger.z3950
6. Install the debs:
$ sudo dpkg -i koha-perldeps koha-deps koha-common
=> SUCCESS: Install process doesn't explode due to the addition
=> SUCCESS: /etc/koha/sites/test1/log4perl.conf has a new entry for log4perl.logger.z3950
=> SUCCESS: /etc/koha/sites/test2/log4perl.conf doesn't have a new entry for log4perl.logger.z3950
7. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The line for enabling the unsafe expand_entities option is commented
and includes a warning to keep it like that ;)
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
It would be nice to be able to search and install plugins directly from GitHub ( and GitLab if possible ). This would make it easier to verify the authenticity of plugins and make discovering new plugins easier as well as making installation of plugins simpler.
Test Plan:
1) Apply this patch
2) Add the new block for plugin_repos to your koha-conf.xml
3) Restart all the things!
4) Browse to the plugins home page
5) Try searching for 'patrons' in the new search box
6) Verify you get results!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Context: I am trying to make koha-misc4dev stop when something wrong happens.
Basically we do not want the process to continue of the DB has not been populated correctly.
It will make the errors easier to catch.
The issue: Say a script that will return an error (die in perl for an easy example),
koha-shell will not return the 255 error code, but 0 instead.
The caller cannot know something wrong happened
The solution is to propagate the error and make koha-shell return the same error code
as the command it executed
An example:
=== t.pl ===
die('something wrong');
% perl t.pl;echo $?
something wrong at t.pl line 1.
255
% sudo koha-shell kohadev -p -c 'perl xxx.pl' ; echo $?
something wrong at xxx.pl line 1.
0
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Tested it with
$ sudo debian/scripts/koha-shell kohadev -c 'exit 8'
$ echo $?
8
The unpatched version returns 0 (forgets about the error code).
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
At the last development meeting we have voted to remove the
QueryParser-related code
https://wiki.koha-community.org/wiki/Development_IRC_meeting_19_February_2020
Hea tells us that it has not been adopted, and the code/bug tracker that
it is not really usable as it. As nobody is willing to work on it, we
decided to remove it instead.
Test plan:
% prove t/db_dependent/Search.t
must return green
See commits from bug 9239 and confirm that the code is removed in this
patch.
Also play with the search on the UI and confirm that you do not see
obvious regressions
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 9978 should have fixed them all, but some were missing.
We want all the license statements part of Koha to be identical, and
using the GPLv3 statement.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
cpanfile is a format for describing CPAN dependencies for Perl
applications.
It is more concise - thus easier to read and maintain - than
C4::Installer::PerlDependencies, and allows to describe requirements
more accurately (using version ranges or features for instance)
Additionally it can be read by tools such as cpanm or carton for an
easy way to install dependencies on non-Debian-based systems.
For more information on cpanfile, see
http://search.cpan.org/~miyagawa/Module-CPANfile-1.1002/lib/cpanfile.pod
This patch replace C4::Installer::PerlDependencies by an equivalent
cpanfile and update all scripts/modules that were using PerlDependencies
It also removes dead code from C4::Installer::PerlModules (some
subroutines were not used at all, except in unit tests)
Added dependencies:
- Module::CPANfile
- CPAN::Meta (dependency of Module::CPANfile, but we need a more recent
version than the one Module::CPANfile requires)
Test plan:
1. Go to About page, tab Perl modules and keep this browser tab open
2. Apply patch
3. Install Module::CPANfile and CPAN::Meta
a. On Debian-based systems:
# will install libcpan-meta-perl as a dependency
sudo apt install libmodule-cpanfile-perl
b. Others:
# will install CPAN::Meta as a dependency
sudo cpanm Module::CPANfile
4. In a new browser tab, go to About page, tab Perl modules and compare
the table with the one in the previous browser tab
They should be identical, except for newly added dependencies
(Module::CPANfile and CPAN::Meta)
5. Do a 'standard' install
a. perl Makefile.PL (select 'standard')
b. make
c. sudo make install
d. Configure your database, web server, ... and go through the web
install process
6. Verify that the cpanfile got copied into PERL_MODULE_DIR (which
should be /usr/share/koha/lib)
7. Go to the about page of this fresh install and compare it with your
dev install
8. Verify that debian/list-deps still works
This takes a lot of time and it may not be necessary to wait until
the end. If you see some Debian package names that correspond to
modules in cpanfile, it means it still works
(you need apt-file for this script to work)
9. Verify that koha_perl_deps.pl still works
10. prove t/Installer_pm.t t/Installer_PerlModules.t
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
- Enable sip for your testing instance
sudo koha-sip --enable inst
- Start sip for your testing instance
sudo koha-sip --start inst
- Verify it is running
ps ax |grep sip -> you should see processes
- Disable sip for your testing intance
sudo koha-sip --disable inst
- Verify that the following has happened:
* SIP is no longer running for your instance - no SIP processes
* SIP Cannot be started for the instance because it is not enabled.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
The dependancy has now been packaged, this patch adds it to the debian
control file for package installs.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Trivial change. Speaks for itself.
Since koha/detail.pl does not exist, we cannot break things ;)
Test plan:
[1] Copy the change in apache-shared-intranet.conf to your actual
apache configuration. Probably in /etc/koha/.
[2] Restart Apache.
[3] Try a biblionumber say 123 on intranet with [your_staff_client]/bib/123.
Does the detail page come up?
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch adds the --elasticsearch-server option switch to koha-create.
It allows choosing a different Elasticsearch configuration. It defaults
to the current 'localhost:9200' value.
To test:
- Apply this patches
- Run:
$ reset_all
$ man koha-create
=> SUCCESS: The man page shows correct information about the added
option switch
- Run:
$ sudo koha-create --create-db test
=> SUCCESS: /etc/koha/sites/test/koha-conf.xml contains the default
value (i.e. the current behaviour is kept)
- Run:
$ sudo koha-create --create-db --elasticsearch-server tomas:1234 test2
=> SUCCESS: /etc/koha/sites/test2/koha-conf.xml contains the passed
value in the <elasticsearch><server> section.
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Missing entries are added to those files.
Test plan:
Search for typos
Compare the two files and comfirm the entries are the same in both.
Exception: supportdir exists in etc/koha-conf.xml only, but I think it's
obsolete.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This patch makes the init script deal with koha-z3950-responder in --stop
and --restart actions. Currently, only --start calls the script.
To test:
- Enable the server:
$ koha-z3950-responder --enable kohadev
- Stop koha-common
$ service koha-common stop
=> SUCCESS: No koha-z3950-responder running
- Start koha-common
$ service koha-common start
=> SUCCESS: It is loaded (even if failing because of config issues)
- Stop koha-common
$ service koha-common stop
=> FAIL: It is still running (no --stop issued)
- Repeat for restart
- Apply this patch
- Redo
=> SUCCESS: Things behave as expected!
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha has a number of features that rely on knowing the IP address of the connecting client. If that server is behind a proxy these features do not work.
This patch adds a module to automatically convert the X-Forwarded-For header into the REMOTE_ADDR environment variable for both CGI and Plack processes.
TEST PLAN:
1) Apply this patch set
2) Install Plack::Middleware::RealIP via cpanm or your favorite utility
3) Update your plack.psgi with the changes you find in this patch set ( this process differs based on your testing environment )
4) Restart plack
5) Tail the plack error log for your instance
6) Use curl to access the OPAC, adding an X-Forwarded-For header: curl --header "X-Forwarded-For: 32.32.32.32" http://127.0.0.1:8080
7) Note the logs output this address if you are unproxied
8) If you are proxied, restart plack using a command like below, where the ip you see in the logs ("REAL IP) is what you put in the koha conf:
<koha_trusted_proxies>172.22.0.1 1.1.1.1</koha_trusted_proxies>
9) Restart all the things!
10) Repeat step 6
11) You should now see "REAL IP: 32.32.32.32" in the plack logs as the remote address in your plack-error.log logs!
12) Disable plack so you are running in cgi mode, repeat step 6 again
13) You should see "REAL IP: 32.32.32.32" as the remove address in your opac-error.log logs!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Ed Veal <eveal@mckinneytexas.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Test plan:
Run koha-dump [yourdb]. Rename the files in var/spool/koha/[yourdb]
Run koha-dump --without-db-name [yourdb]
Run a diff between the unzipped sql files. The last dump should not
contain a CREATE DATABASE and USE statement. See BZ 15664 c4.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
To test:
- Run "sudo koha-plack restart kohadev" and verify the output is
out of line.
- Apply the patch
- If you are on e.g. kohadevbox you need to copy koha-plack to
/usr/sbin/ thus:
sudo cp debian/scripts/koha-plack /usr/sbin/koha-plack
- Run "sudo koha-plack restart kohadev" again and check that you
get two lines of output, nicely aligned with the "OK" inside the
square brackets.
Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-zebra has a nice, informative --status switch, koha-indexer
does not. This patch adds it.
To test:
- Run "sudo koha-indexer --status kohadev" - you get an error:
"Error: invalid option switch (--status)"
- Apply this patch
- If you are on e.g. kohadevbox you need to copy koha-indexer to
where it is actually run from:
sudo cp debian/scripts/koha-indexer /usr/sbin/koha-indexer
- Run "sudo koha-indexer --status kohadev" again and you should
get a nice status telling if the indexer is running or not
- Toggle the indexer on and off with koha-indexer --start/--stop
and verify the status is telling the truth about the state of
the indexer
- Run "sudo koha-indexer --help" and check there is a description
of the --status option
- Have a look at debian/docs/koha-indexer.xml and verify there is
an adequate description of the --status option.
- Run "prove -v xt/verify-debian-docbook.t" to check the structure
of the man page in DocBook format.
PS: I tried to generate a manpage from the DocBook as described at
https://wiki.koha-community.org/wiki/Testing_man_pages
but the output did not look good for any of our DocBook files.
Not sure why.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Missing installer for debian packages.
Sponsored-by: Koha-Suomi Oy
Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Trivial edit. The usage statement is wrong.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Before patch: -D and -d are mistaken for --debug
$ sudo DEB_BUILD_OPTIONS=nocheck ./debian/build-git-snapshot -r ~/debian -v 19.06~git --autoversion -d -D="stretch"
Option d does not take an argument
git status --porcelain -unormal
git rev-parse --short=8 HEAD
dch --force-distribution -D "squeeze-dev" -v "19.06~git+20190627205913.466f99e4-1" "Building git snapshot."
dch warning: Recognised distributions are:
experimental, unstable, testing, stable, oldstable, oldoldstable,
{bullseye,buster,stretch,jessie,wheezy}-proposed-updates,
{testing,stable,oldstable,oldoldstable}-proposed-updates,
{bullseye,buster,stretch,jessie,wheezy}-security,
{testing,stable,oldstable,oldoldstable}}-security, jessie-backports, stretch-backports and UNRELEASED.
Using your request anyway.
NOTE: squeeze-dev in the first dch line and warning about Option d.
Apply patch: -D and -d are differentiated correctly.
$ sudo DEB_BUILD_OPTIONS=nocheck ./debian/build-git-snapshot -r ~/debian -v 19.06~git --autoversion -d -D="stretch"
git status --porcelain -unormal
git rev-parse --short=8 HEAD
dch --force-distribution -D "stretch" -v "19.06~git+20190627210316.b3f919a7-1" "Building git snapshot."
dch warning: Previous package version was Debian native whilst new version is not
dch -r "Building git snapshot."
NOTE: No more 'Option d' error, and "stretch" in the first dch line.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Rather than try to use -y and symbols, since
older versions of pwgen don't have the -y,
Purposefully just shorten the generated
password to 15 characters and put @ on the end.
This avoids nasty shell globbing, fixes the
MySQL requiring a symbol by default in the
newer versions.
While @ at the end is less secure, the
password portion providing security is
still 15 characters long.
Before patch, password should have potentially
multiple ugly symbols in it.
After patch, when creating an instance, the
password will have an @ at the end of it.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
MySQL 5.7 is old, and the latest versions fail on "GRANT USAGE" if the
user does not exist. "DROP USER IF EXISTS" has been with us since 5.7,
so all users should have it by now. This patch fixes the issue.
To test:
Try to koha_remove a site, and if it works with no errors, all good!
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
TEST PLAN
---------
$ sudo mysql -u root
> CREATE USER 'bug23090_test1'@'localhost' IDENTIFIED BY 'badpassword';
[Magical MySQL Error]
> CREATE USER 'bug23090_test1'@'localhost' IDENTIFIED BY 'GoodP@ssw0rd';
[Should be okay]
> DROP USER 'bug23090_test1'@'localhost';
> QUIT
$ sudo koha-create --create-db fail23090
[Magical MySQL Error]
[Apply this patch and put it (debian/scripts/koha-create) into place in
/usr/sbin/koha-create]
$ sudo koha-create --create-db pass23090
(Clean up and databases made)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Like history.txt we need to tell some debian/ files to copy
teams.yaml
Also pick it for the `make install` process (Makefile.PL)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Like history.txt we need to tell some debian/ files to copy contributors.yaml
Also pick it for the `make install` process (Makefile.PL)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
TEST PLAN
---------
sudo koha-plack --disable
sudo koha-plack --disable
sudo koha-plack --enable
sudo koha-plack --disable
echo $?
sudo koha-plack --disable
echo $?
sudo koha-list --noplack
echo $?
sudo koha-plack --enable
echo $?
sudo koha-plack --enable
echo $?
sudo koha-list --plack
echo $?
git bz apply 20692
sudo perl ~/misc4dev/cp_debian_files.pl
then repeat the test.
It should also be noted, because the enable
and disable are now split, if for some reason
they become out of sync, an enable or disable
should correct them.
Because these are bash scripts, the test tool
(/home/vagrant/qa-test-tools/koha-qa.pl)
does not apply.
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes the set_password.pl script generate the password if it
is not passed as an argument.
It also changes the behaviour of set_password.pl: it will now print the
userid and password (generated or not) to mimick the behaviour from
koha-reset-passwd.
The koha-reset-passwd gets simplified as it doesn't generate the random
password anymore, it passes the responsability to set_password.pl
To test:
- Follow the steps from the original platch
- Verify all behaves as expected
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes koha-sip --start calls mention 'SIP server' instead of
the wrong 'Zebra daemon'.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch corrects a typo, and exports KOHA_CONF as other scripts do.
To test:
- Apply this patch
- Run:
$ # in kohadevbox
$ perl misc4dev/cp_debian_files.pl
- Try the new script
$ sudo koha-sip --start kohadev
=> SUCCESS: tail -f /var/log/koha/kohadev/sip* doesn't show fatal errors
anymore
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch removes traces from the (deprecated) koha-*-sip scripts.
To test:
- Apply the patch
- Verify no traces of koha-*-sip remain on the codebase (besides
Release Notes, koha-common.links and the koha-sip script):
$ cd kohaclone
$ git grep koha-start-sip
$ git grep koha-stop-sip
$ git grep koha-enable-sip
=> SUCCESS: No traces!
- Create the following symlinks:
$ sudo ln -s /usr/sbin/koha-sip /usr/sbin/koha-start-sip
$ sudo ln -s /usr/sbin/koha-sip /usr/sbin/koha-stop-sip
$ sudo ln -s /usr/sbin/koha-sip /usr/sbin/koha-enable-sip
- Try the koha-*-zebra commands:
$ sudo koha-stop-sip kohadev
$ sudo koha-start-sip kohadev
$ sudo koha-restart-sip kohadev
=> SUCCESS: They all work as expected!
- Sign off :-D!
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes all maintenance scripts use **koha-sip** instead of
the old **koha-*-sip** scripts.
To test:
- Run:
$ perl misc4dev/cp_debian_files.pl
$ sudo service koha-common stop
=> SUCCESS: No errors and the SIP-related sevices are stopped
$ sudo service koha-common start
=> SUCCESS: No errors and the SIP-related services are started
$ sudo service koha-common restart
=> SUCCESS: No erros and SIP-related services are running
$ sudo koha-create --create-db test
$ sudo koha-sip --enable test
$ sudo koha-sip --start test
$ sudo koha-disable test
=> SUCCESS: No errors, instance disabled, no SIP running for test
- Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds the fancy tab completion in bash.
To test:
- Run:
$ source debian/koha-common.bash-completion
$ sudo koha-sip <tab>
- Play with all the options
=> SUCCESS: The combinations make sense (e.g. only SIP-enabled instances
are completed for --start, --stop, --restart, -v and --verbose are not
offered if the other one is already in there, --enable only applies to
SIP-disabled instances, etc).
- Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch adds the manpage for koha-sip.
To test:
- Apply this patch
- Run:
$ kshell
k$ prove xt/verify-debian-docbook.t
=> SUCCESS: Tests pass!
- Run:
$ misc4dev/cp_debian_files.pl
$ man koha-sip
=> SUCCESS: The man page shows correctly.
- Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch introduces a single script to handle all actions on SIP
servers for Koha instances. It is intended to be a replacement for:
- koha-start-sip
- koha-stop-sip
- koha-enable-sip
It adds a function called is_sip_running to koha-functions.sh.
To test:
- Apply this patch
- Run:
$ misc4dev/cp_debian_files.pl
$ sudo koha-sip --enable kohadev
$ sudo koha-sip --start kohadev
$ sudo koha-sip --status kohadev
=> SUCCESS: The SIP server is running for kohadev
- Run:
$ sudo koha-sip --restart --verbose kohadev
$ sudo koha-sip --status kohadev
=> SUCCESS: The SIP server is running for kohadev
- Run:
$ sudo koha-sip --stop kohadev
$ sudo koha-sip --status kohadev
=> SUCCESS: The SIP server is not running for kohadev
- Play with other combinations like enabling an already enabled
instance, etc. Remember you need to remove the
/etc/koha/sites/kohadev/SIPconfig.xml file so it is considered disabled.
- Sign off :-D
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
The default for Zebra is to not return results where the record size is
greater than 1045 KB ( 1 MB ). Some libraries need to increase this
ceiling, but it may come at a cost with z39.50 compatibility with other
services. For that reason, we should make this setting configurable on a
per-instance basis.
Test plan for kohadevbox:
1) Apply this patch
2) Run:
$ reset_all
3) Restart Zebra:
$ sudo koha-zebra --restart kohadev
4) Check how zebrasrv was called:
$ ps waux | grep zebrasrv
=> SUCCESS: Looks like
... /usr/bin/zebrasrv -v none,fatal,warn -k 1024
5) Edit /etc/koha/sites/kohadev/koha-conf.xml, add:
<zebra_max_record_size>2048</zebra_max_record_size>
6) Repeat (3) and (4)
=> SUCCESS: Looks like
... /usr/bin/zebrasrv -v none,fatal,warn -k 2048
7) Sign off :-D
General test plan:
1) Apply this patch
2) Build a Debian package
3) Specify a zebra_max_record_size of 2048 in your koha_conf.xml
4) Restart zebra
5) Index a record greater than 1 MB but smaller than 2 MB
6) Note that it is searchable!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Includes:
* code factorization
Some code from subscription & Mana-KB has been factorized in order to speed-up next developments
* SytemPreferences:
Mana Activation:
- add a value "no, let me think about it", that is the default value.
- as long as this value is selected, messages ask if user want to activate it ( in Administration and Add-subscription(page 2) )
AutoShareWithMana
- Add the syspref AutoShareWithMana: user can automatically share infos with Mana-KB (not set by default)
* Interface :
- On mana-search, rows are now sorted by date of last import, then by number of users
- Windows redesigned to improve the user experience
* New Feature : report a mistake.
- people can now report an invalid data (wrong, obsolete,...)
- if a data is reported as invalid many time, it will appear differently
- Added few tooltip (to explain the fields last import, nb of users, to explain the new feature)
- When reporting a data as invalid, a comment can also be added. Koha will then display comments related to data in result lists
* API (svc/mana)
- add svc/mana/addvaluetofield: allows to ask mana incrementing a field of a resource
- no hardcoding for resources in the code of api (api needs to be called with a ressourcename)
* New feature : SQL report sharing
- Create Koha::Report.pm and Koha::Reports.pm, objects class for Reports
- New feature: share reports with Mana-KB
- New feature: search report in Mana-KB with keywords
- New feature: load reports from Mana-KB
Test plan:
1 - Apply Patch + update database
2 - Copy the three lines about mana config in etc/koha-conf.xml in ../etc/koha-conf.xml (after <backupdir> for example)
<!-- URL of the mana KB server -->
<!-- alternative value http://mana-test.koha-community.org to query the test server -->
<mana_config>https://mana-kb.koha-community.org</mana_config>
3 - Check Mana syspref and AutoShareWithMana syspref are not activated
4 - Search the syspref ManaToken and follow the instructions
5 - subscriptions
- Try create a new subscription for a first serial => Mana-KB shouldn't show you anything (except if the base hase been filled)
- Share this serial with Mana-KB (on the serial individual's page there must be a Share button)
- Try to create a new subscription for serial nr1 => a message should appear when you click on "next", click on "use", the fields should automaticaly appear
- Activate AutoShareWithMana => Subscriptions
- Create a new subscription for a second serial
- There shouldn't be any Share button
- Create a second subscription => the message should appear, click again on use
6 - SQL Report
- Create a new SQL report, without notes.
- On the table with all report (reports > use saved), there should be the action "Share"
- If you click on share, you have an error message
- Create a new report, with a title and notes longer than 20 characters
- You can share it with mana => you will have a success message
- On (report > use saved), there must be a message inviting you to search on Mana-KB for more results, enter a few word from title, notes, type of the report you shared, it should appear. You can use it, it will load it into your report list.
7 - Report mistakes.
- On any table containing Mana-KB search results, you can report a mistake and add a comment.
8 - For each previous test, try to send wrong data, to delete the security token, to send nothing: it should show a correct warning message.
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Rebased-by: Alex Arnaud <alex.arnaud@biblibre.com> (2018-07-04)
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Since we now require the <branch> block, we should add it to the config
templates
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
I added libwebservice-ils-perl 0.17 to the repository, so it
goes into debian/control too.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andreas Roussos <arouss1980@gmail.com>
Works as intended. I've set USE_MEMCACHED to "no" and created a new
Koha instance. Home > About now reports this information: Memcached:
Servers: undefined | Namespace: undefined | Status: unknown | Config
read from: Nowhere [...] | Effective caching method: Cache::Memory
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-create contains a call to `zcat` which fails if the file passed
as an argument is not in gzip format.
This patch fixes the issue by adding the -f flag to the zcat call in
koha-create, as per the top-voted answers in the following SE URLs:
https://unix.stackexchange.com/a/77309https://unix.stackexchange.com/a/131944
Test plan:
1) in /etc/koha/koha-sites.conf, set the DEFAULTSQL variable to point
to an _uncompressed_ SQL database dump
2) run `koha-create --create-db instance` and notice how it fails with:
gzip: /path/to/dump.sql: not in gzip format
3) apply the patch
4) notice the extra line of information "The SQL file can be optionally
compressed with gzip" in koha-sites.conf
5) run the `koha-create` command again, this time it should work
6) repeat with DEFAULTSQL pointing to a gzip'd dump, it should work too
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Having a 'user'@'%' line decreases database security.
Bug 16690 closes the need for such a line, and this
bug removes the use of it.
TEST PLAN
---------
While this depends on 16690, it is not required for testing.
On a kohadev box:
sudo koha-create --create-db test_17237_a
git bz apply 17237
sudo perl ~/misc4dev/cp_debian_files.pl
restart_all
sudo systemctl daemon-reload
sudo koha-create --create_db test_17237_b
sudo mysql -u root
SELECT user,host from mysql.user;
-- test_17237_a will have two entries, one being '%'
-- test_17237_b will only have one entry, not '%'
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
'gr' (as in 'Greek') is missing from the ZEBRA_LANGUAGE options
in debian/templates/koha-sites.conf. This patch fixes that.
Test plan:
1) view koha-sites.conf and notice how 'gr' is missing from the
ZEBRA_LANGUAGE options
2) apply the patch
3) observe that koha-sites.conf now includes 'gr' as an option
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This table was only used by XISBN, this patch remove the table and the
related code (cronjobs)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
https://bugs.koha-community.org/show_bug.cgi?id=21235
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes the apache configuration for the reverse proxy
(required for Plack) so it sets the X-FORWARDED-PROTO header correctly
for Plack::Middleware::ReverseProxy to use it.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Since we actually resolve 19799 now (Changing language on OPAC redirects
back to homepage), I will move that code to a new enh report.
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This is a result of Bug 21068: Remove NorwegianPatronDB related code
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Remove:
- BIB_INDEX_MODE and AUTH_INDEX_MODE env var
- bib_index_mode and auth_index_mode options from scripts
- Warnings from about page, just kept one if zebra_bib_index_mode or
zebra_auth_index_mode still exist in config and are set to grs1
Test plan:
- Install Koha from src
- Install Koha from pkg
- Read the code, carefully!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Rebased
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
To test:
1 - Run koha-rebuild-zebra with multiple '-v'
2 - Note no increased verbosity
3 - Apply patch
4 - Run the updated koha-rebuild-zebra script with multiple '-v'
5 - Note increased verbosity
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
The Rewrite rules for Apache don't work unless you're using
debian/templates/apache-shared-opac-plack.conf or
debian/templates/apache-shared-intranet-plack.conf.
This patch fixes the Rewrite rules for the non-Plack Debian
Apache configuration templates as well as the standard
Apache configuration file that comes with Koha.
__BEFORE APPLYING__
1. Visit /api/v1/app.pl/api/v1/spec on your git dev install
2. This should display a large page of JSON
3. Visit /api/v1/spec on your git dev install
4. This should generate a 404 error
__APPLY PATCH__
__AFTER APPLYING__
5. Visit /api/v1/app.pl/api/v1/spec on your git dev install
6. This should display a large page of JSON
7. Visit /api/v1/spec on your git dev install
8. This should display a large page of JSON (identical to
the one from earlier steps)
Signed-off-by: Ere Maijala <ere.maijala@helsinki.fi>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Passed QA with few notes posted separately to Bugzilla.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
"""The default value is development, which causes plackup to
load the middleware components: AccessLog, StackTrace, and Lint unless
--no-default-middleware is set."""
Test plan:
Confirm that the stack trace is displayed when something is wrong (die somewhere to test)
for dev installations (inside a devbox)
The -E flag must remain deployment for non-dev installs
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This is a workaround meant to correct upgrading installs.
We force the order by disable/enable.
Test plan:
[1] When upgrading an existing install, check that the startup order
after the upgrade has been corrected in /etc/rcX.d (say X=5).
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Currently koha-common may start before memcached. We should prevent that.
If we add memcached to the LSB section of the koha-common init script,
Debian's insserv will know about this requirement.
Note: This patch is only a step in resolving the issue.
Test plan:
[1] Copy the updated koha-common script to /etc/init.d
[2] Look for S..koha-common and S..memcached in /etc/rcX.d (say X=5)
[3] Run sudo update-rc.d koha-common disable
[4] Run sudo update-rc.d koha-common enable
[5] Look again for S..koha-common in /etc/rcX.d (say X=5).
The number for koha-common should now be higher than for memcached.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Improvements:
1) Index settings moved from code to etc/searchengine/elasticsearch/index_config.yaml. An alternative can be specified in koha-conf.xml.
2) Field settings moved from code to etc/searchengine/elasticsearch/field_config.yaml. An alternative can be specified in koha-conf.xml.
3) mappings.yaml has been moved from admin/searchengine/elasticsearch to etc/searchengine/elasticsearch. An alternative can be specified in koha-conf.xml.
4) Default settings have been improved to remove punctuation from phrases used for sorting etc.
5) State variables are used for storing configuration to avoid parsing it multiple times.
6) A possibility to reset the fields too has been added to the reset operation of mappings administration.
7) mappings.yaml has been moved from admin/searchengine/elasticsearch to etc/searchengine/elasticsearch.
8) An stdno field type has been added for standard identifiers.
To test:
1) Run tests in t/Koha/SearchEngine/Elasticsearch.t
2) Clear tables search_fields and search_marc_map
3) Go to admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1
4) Verify that admin/searchengine/elasticsearch/mappings.pl displays the mappings properly, including ISBN and other standard number fields.
5) Index some records using the -d parameter with misc/search_tools/rebuild_elastic_search.pl to recreate the index
6) Verify that you can find the records
7) Put <elasticsearch_index_mappings>non_existent</elasticsearch_index_mappings> to koha-conf.xml
8) Verify that admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1 fails because it can't find non_existent.
9) Copy etc/searchengine/elasticsearch/mappings.yaml to a new location and make elasticsearch_index_mappings setting in koha-conf.xml point to it.
10) Make a change in the new mappings.yaml.
11) Clear table search_fields (mappings reset doesn't do it yet, see bug 20248)
12) Go to admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1
13) Verify that the changes you made are now visible in the mappings UI
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 20073: Move Elasticsearch yaml files back to admin directory
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Bug 20187 has changed the JS and CSS rewrite rules to :
RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].js$ $1.js [L]
RewriteRule ^(.*)_[0-9][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9][0-9].css$ $1.css [L]
This patch changes this rules using [0-9]{N} and fusion in one rule.
And espaces the dot in extension js and css.
Test plan :
1) Go to intranet and opac
2) Check CSS and JS are doing well
3) Apply patch changes on our Apache configuration
4) Reload intranet and opac pages (Ctrl + F5)
5) Check CSS and JS are doing well
Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Move memcached from suggested to depends for Debian packages.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
libhttp-oai-perl in Stretch is 4.03 and broken. Koha depends on
libhttp-oai-perl << 4 for that reason. To make the installation of Koha
on Stretch as easy as possible, this patch adds the alternative
libhttp-oai-3.27-perl which we provide in the Koha repository.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This reverts commit f489d2034b.
This commit breaks the install process when using debian packages.
Reverting as we are very close to the 18.05.00 release
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Until HTTP::OAI is patched so it actually works, and bug 17704 fixes the API change Koha-side, we need to explicitly pull the right version. Otherwise people using Debian 9+ derived distros (Ubuntu 16.04+) are seeing production issues.
This implies packaging our custom libhttp-oai-perl distribution in the meantime.
This patch makes Koha require a version lower than 4.0.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Auto-generated file.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Upload creates its own upload folder in the temp folder, so there is no
need to add another level in temporary_directory.
Removing the creation of this folder in koha-create-dirs too.
Also removing the use Koha::UploadedFiles in about.pl. No longer needed.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Line 463 lists valid parameters, but it was missing
upload-tmp-path: which resulted in the koha-create
saying it is an invalid parameter.
TEST PLAN
---------
1) apply all patches but this.
2) sudo perl ~/misc4dev/cp_debian_files.pl
3) restart_all
4) sudo koha-create --create-db --upload-tmp-path unique-path
awesome-test-name
-- Fails to run.
5) apply this patch
6) repeat 2-4
7) sudo vi /etc/koha/sites/awesome-test-name/koha-conf.xml
-- the upload_tmp_path entry should have unique-path
in it.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds an option to the koha-conf.xml file for specifying
a temporary uploaded files directory.
The koha-create script is adjusted to handle it and a convenient option
switch is added. If ommited, it will default to
/var/lib/koha/<instance>/uploads_tmp.
koha-create-dirs is patched to create the required directory with the
right permissions.
The docs get the new parameter documented.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch makes koha-zebra return 0 (or 1) even when verbose mode is
off. This made koha-zebra --start always return a failure even when the
daemon was correctly launched.
To test:
- Have Zebra running for kohadev instance on your KohaDevBox
- Run:
$ sudo koha-zebra --stop kohadev && echo yay || echo doh
=> FAIL: 'doh' is printed
- Run:
$ sudo koha-zebra --start kohadev e&& echo yay || echo doh
=> FAIL: 'doh' is printed as well
- Apply this patch
- Run:
$ sudo perl misc4dev/cp_debian_files.pl
$ sudo koha-zebra --stop kohadev && echo yay || echo doh
=> SUCCESS: 'yay' is printed
- Run:
$ sudo koha-zebra --start kohadev e&& echo yay || echo doh
=> SUCCESS: 'yay' is printed
- Sign off :-D
Sponsored-by: ByWater Solutions
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds a --timezone switch to koha-create so the timezone can
be set on creation time. It defaults to empty (i.e. using the server's
local time).
To test:
- Create an instance:
$ sudo koha-create --create-db timezone1
=> SUCCESS: /etc/koha/sites/timezone1/koha-conf.xml contains an empty
<timezone> entry.
- Apply this patch
- Run:
$ perl misc4dev/cp_debian_files.pl
- Create a new instance:
$ sudo koha-create --create-db timezone2
=> SUCCESS: /etc/koha/sites/timezone2/koha-conf.xml contains an empty
<timezone> entry (i.e. the current behaviour is preserved).
- Create a new instance:
$ sudo koha-create --create-db --timezone Your/Timezone timezone3
=> SUCCESS: /etc/koha/sites/timezone3/koha-conf.xml contains
<timezone>Your/Timezone</timezone> (i.e. introduced behaviour works)
- Sign off :-D
Sponsored-by: ByWater Solutions
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
- Removed merge marker
- Changed include path in favor of using the Asset tt plugin (bug 20538)
- Changed access_dir to a two-level entry for clarity
Test plans stay the same, just make sure that the two-level configuration entry
work properly and everything pass QA.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This squash contains all of these commits:
- Adds a page to access log files on the server from the intranet
- Update ID to allow for permalinking
- Rename config to "'accessdir' and fix qa
- Allows for multiple directories to be accessible
- Update the link under reports
- (Follow-up) Fixing merge error and cosmetic changes
- (Follow-up) Fix tab chars and move javascript to the footer
- (QA Follow-up) Fix datatable
- Make filename unicode-proof, renamed accessdir to access_dir and fix update
Test plans:
- Apply patch, update database
- Add to koha-conf:
<access_dir>/tmp/koha-public/one</access_dir>
<access_dir>/tmp/koha-public/two</access_dir>
<access_dir>/tmp/koha-public</access_dir>
- Create these directories ( mkdir /tmp/koha-public , etc...)
- Create these files:
echo "hello world!" > /tmp/koha-public/❤
echo "test" > /tmp/koha-public/one/samename.txt
echo "this is not the same" > /tmp/koha-public/two/samename.txt
- Login as Superadmin, go to tools > reports files
- Click on ❤, make sure it's downloadable and readable
- Click on both samename.txt, look inside and make sure the file is different
- Login as NON-superadmin. Go under tools, see no Report/Log under the third column
- Go to add tools/access_file permission to user
- See new entry under tools third column.
- validate link is ok.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note that there is no way to create an install without memcached.
As it is now considered as stable, there is no point to not use it.
Test plan:
Create a new Koha install and make sure memcached is enabled by default
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Improvements:
1) Index settings moved from code to etc/searchengine/elasticsearch/index_config.yaml. An alternative can be specified in koha-conf.xml.
2) Field settings moved from code to etc/searchengine/elasticsearch/field_config.yaml. An alternative can be specified in koha-conf.xml.
3) mappings.yaml has been moved from admin/searchengine/elasticsearch to etc/searchengine/elasticsearch. An alternative can be specified in koha-conf.xml.
4) Default settings have been improved to remove punctuation from phrases used for sorting etc.
5) State variables are used for storing configuration to avoid parsing it multiple times.
6) A possibility to reset the fields too has been added to the reset operation of mappings administration.
7) mappings.yaml has been moved from admin/searchengine/elasticsearch to etc/searchengine/elasticsearch.
8) An stdno field type has been added for standard identifiers.
To test:
1) Run tests in t/Koha/SearchEngine/Elasticsearch.t
2) Clear tables search_fields and search_marc_map
3) Go to admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1
4) Verify that admin/searchengine/elasticsearch/mappings.pl displays the mappings properly, including ISBN and other standard number fields.
5) Index some records using the -d parameter with misc/search_tools/rebuild_elastic_search.pl to recreate the index
6) Verify that you can find the records
7) Put <elasticsearch_index_mappings>non_existent</elasticsearch_index_mappings> to koha-conf.xml
8) Verify that admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1 fails because it can't find non_existent.
9) Copy etc/searchengine/elasticsearch/mappings.yaml to a new location and make elasticsearch_index_mappings setting in koha-conf.xml point to it.
10) Make a change in the new mappings.yaml.
11) Clear table search_fields (mappings reset doesn't do it yet, see bug 20248)
12) Go to admin/searchengine/elasticsearch/mappings.pl?op=reset&i_know_what_i_am_doing=1
13) Verify that the changes you made are now visible in the mappings UI
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch removes traces from the (deprecated) koha-*-zebra scripts.
To test:
- Apply the patch
- Verify no traces of koha-*-zebra remain on the codebase (besides
Release Notes and the koha-zebra script):
$ cd kohaclone
$ git grep koha-start-zebra
$ git grep koha-stop-zebra
$ git grep koha-restart-zebra
=> SUCCESS: No traces!
- Create the following symlinks:
$ sudo ln -s /usr/sbin/koha-zebra /usr/sbin/koha-start-zebra
$ sudo ln -s /usr/sbin/koha-zebra /usr/sbin/koha-stop-zebra
$ sudo ln -s /usr/sbin/koha-zebra /usr/sbin/koha-restart-zebra
- Try the koha-*-zebra commands:
$ sudo koha-stop-zebra kohadev
$ sudo koha-start-zebra kohadev
$ sudo koha-restart-zebra kohadev
=> SUCCESS: They all work as expected!
- Sign off :-D!
Sponsored-by: Orex Digital
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The following output:
dh: Compatibility levels before 9 are deprecated (level 7 in use)
dh_testdir -O--fail-missing
dh_auto_clean -O--fail-missing
dh_auto_clean: Compatibility levels before 9 are deprecated (level 7 in use)
dh_clean -O--fail-missing
is given when trying to following these instructions:
https://wiki.koha-community.org/wiki/Building_Debian_Packages_-_The_Easy_Way
This merely tweaks the debian/compat file from 7 to 9.
The message goes away.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
From https://www.debian.org/doc/manuals/maint-guide/dother.en.html:
You may use compat level v9 in certain circumstances for compatibility with older systems. However, using any level below v9 is not recommended and should be avoided for new packages.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Followed test plan. Patch functions as described and both commands execute.
Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This attempts to handle issues arising when running
koha-create on a system that never had MySQL installed.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Trivial and hypothetical fix.
If you create /root/AA B (space in dirname), the quotes added here will
help you to get back where you came from.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes koha-plack jump into the instance's home directory to
run.
It is required because Perl 5.18 introduced a breaking change that
makes perl die if @INC includes directories for which the user doesn't
have read permission, and need to be traversed when querying for a lib.
This is the case of '.', which is introduced automatically into @INC
until Perl 5.26 (which removes the 'feature').
The Mojolicious::Plugins lib prefixes the plugin names with
'Mojolicious::Plugin' so it first looks (for example) for
Mojolicious::Plugin::Koha::REST::Plugin::Pagination (Pagination is just
the first one on the list). When it looks for it at '.' it dies (because
of Perl's behaviour) so it doesn't query for the right namespace (the
following to try).
I only reproduced it in koha-testing-docker. To test, you just need to
try this patched koha-plack and make sure it doesn't break due to this
permissions issue.
To test:
- In your koha-testing-docker clone, run:
$ docker-compose up -p test
- Open a shell inside the container (on a separate terminal):
$ docker exec -it test_koha_1 bash
- From within the /root directory, restart plack:
$ cd /root
$ koha-plack --restart kohadev
=> FAIL: Logs show plack is broken due to permissions problems trying to
find Mojolicious::Plugin::Koha::REST::Plugin::Pagination
- Use the patched script from this patch:
$ /kohadevbox/koha/debian/scripts/koha-plack --restart kohadev
=> SUCCESS: Plack runs fine, no error in the logs
- Sign off :-D
Note: people who has environments in which the problems is reproducible,
please test this version of koha-plack and stamp your sign-off,
PLEASE.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This test does obviously not achieve the desired result:
[ "chdir" != "no" ]
Trivial fix.
Adding the same quotes around starting_dir (just as for Bug 19546).
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
In order to patch production sites we need to adjust the shipped
cronjobs so they are called with the --chdir option switch.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Until Perl 5.26, the current directory is added to @INC when running a
Perl script [1]. Having the current directory in @INC means it can be
tried to be traversed when performing a lib lookup. Since version 5.18,
Perl dies when it finds an unreadable directory (permissions) in @INC
that needs to be traversed. This behaviour won't change because Perl
devs consider it an enhancement to security. [2]
Because of this, we need to make sure our scripts are ran **from** a
directory in which they have read permissions.
Ths patch adds a --chdir option switch to the **koha-foreach** wrapper
script, that makes the inner shells/scripts to be ran within the Koha
instance's user home directory.
The change is trivial and should be QAed easily. I tested this on a prod
server:
- Create a /tmp/test.pl file containing:
use Modern::Perl;
use Cwd;
my $dir = getcwd;
warn $dir;
1;
A) then create a cronjob entry to run it using koha-foreach:
(in /etc/cron.d/test):
1/* * * * * root koha-foreach perl /tmp/test.pl
- Once I noticed the cronjob ran, I used mutt to read the emails in the
root user.
=> FAIL:
...
Subject: Cron <root@koha> koha-foreach --enabled perl /tmp/test.pl
"/root"
"/root"
"/root"
"/root"
"/root"
...
B) I then used the patched koha-foreach with different results:
=> SUCCESS:
...
Subject: Cron <root@koha> /root/koha-foreach --chdir --enabled perl /tmp/test.pl
"/var/lib/koha/acaderc"
"/var/lib/koha/agro"
"/var/lib/koha/anc"
"/var/lib/koha/arico"
"/var/lib/koha/artes"
...
So this patch's approach works. But...
C) master's koha-foreach seems to work just the same... I think it is
because of my previous attempt to fix this by using sudo in koha-shell.
So I think environmental conditions affect the behaviour (which shell is
configured for cron, sudo configuration, etc).
====
In conclusion, I think we should go ahead with this patch as it will solve
peoples issues, and it is a right solution (option #5 on the list) to
this Perl behaviour change. It doesn't cover other commands, but
followup patches could do.
I avoided /tmp as it is writable by any user... so it is an easy path
for both exploiting by replacing some lib, and also because the
existence of an unreadable dir that the interpreter could try to
traverse (unreadable /tmp/Authen or /tmp/Koha will trigger the same
error, and I assume people know what they are putting on the instance's
dir, at least it will be easier to track).
A followup patch takes care of making the cronjobs use --chdir when
calling koha-foreach
[1] https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html
[2] https://rt.perl.org/Public/Bug/Display.html?id=123795
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This patch makes logrotate use the **copytruncate** directive, removing
the need to stop the Zebra and Plack servers on log rotation.
To test:
- Run:
$ misc4dev/cp_debian_files.pl
- Edit the new /etc/logrotate.d/koha-common file changing 'weekly' for
'hourly'. This is to ease testing.
- Run:
$ sudo ls -l /var/log/koha/kohadev
- Open a second terminal on your kohadevbox. On it...
- Run:
$ sudo logrotate /etc/logrotate.d/koha-common
- Run:
$ sudo ls -l /var/log/koha/kohadev
=> SUCCESS: Files got rotated! (i.e. files ending in .1 are created, the
sizes make sense (.1 have contents, the ones without numbering
probably zeroed <- it will depend on what's happening with
your devbox in between).
- Play with your Koha, do some searches too:
=> SUCCESS: You have access to your Koha, searches work. i.e.:
- Apache handled the log rotation operation
- Plack handled the log rotation operation
- Zebra handled the log rotation operation
- Sign off :-D!
Sponsored-by: Orex Digital
Signed-off-by: Hugo Agud hagud@orex.es
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The service description is very old and outdated. This patch fixes this.
Sponsored-by: Orex Digital
Signed-off-by: Hugo Agud hagud@orex.es
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch makes all maintenance scripts use **koha-zebra** instead of
the old **koha-*-zebra** scripts.
To test:
- Run:
$ perl misc4dev/cp_debian_files.pl
$ sudo service koha-common stop
=> SUCCESS: No errors and the Zebra-related sevices are stopped
$ sudo service koha-common start
=> SUCCESS: No errors and the Zebra-related services are started
$ sudo service koha-common restart
=> SUCCESS: No erros and Zebra-related services are running
$ sudo koha-create --create-db test
=> SUCCESS: Instance created and zebra running for it
$ sudo koha-disable test
=> SUCCESS: No errors and Zebra is stopped for instance test
$ sudo koha-zebra --start test
$ sudo koha-remove test
=> SUCCESS: No errors, instance removed, no Zebra running for test
- Sign off :-D
Sponsored-by: Orex Digital
Signed-off-by: Hugo Agud hagud@orex.es
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
update debian/control. this file is auto generated. no testing required.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch makes the koha-* scripts follow symbolic links when querying for
Koha instances. Without it, it is not possible to define instances outside the
/etc/koha/sites directory,
To test:
- Create a symlink in /etc/koha/sites:
$ sudo ln -s /tmp /etc/koha/sites/test
- Test the original is_instance function:
$ . /usr/share/koha/bin/koha-functions.sh
$ is_instance test && echo success || echo failure
=> FAIL: symlinks are not considered instance names (i.e. failure is printed)
- Apply this patch
- Update the koha-functions.sh file:
$ perl misc4dev/cp_debian_files.pl
- Test is_instance again:
$ . /usr/share/koha/bin/koha-functions.sh
$ is_instance test && echo success || echo failure
=> SUCCESS: symlinks are considered instance names (i.e. success is printed)
- Sign off :-D
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The flags [N,L] make no sense: next and last combined.
Choosing here for L to stop the rewriting process.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha has the ability to include custom css in the apache configuration.
If a library has any custom css ( or adds a custom js file in some way ),
and that file has an underscore in it ( e.g. my_custom.css ), the
apache rewrite rule will convert it to my.css and thus it will 404.
We should make the rewrite rules as specific as possible for the
format we are using.
Test Plan:
1) Set OPAC_CSS_OVERRIDE to a file with an underscore in it
2) Note it does not work
3) Apply this patch
4) Update the apache rewrite rules to match those in the patch
For kohadevbox, just run /home/vagrant/misc4dev/cp_debian_files.pl
5) Restart apache
6) Reload the page, your custom css should load now!
Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Test Plan:
Test Plan:
Check the following files have been updated from
use strict;
use warnings;
to
use Modern::Perl;
services/itemrecorddisplay.pl
suggestion/suggestion.pl
tags/list.pl
tags/review.pl
virtualshelves/sendshelf.pl
help.pl
changelanguage.pl
koha_perl_deps.pl
debian/bd-to-depends
debian/build-git-snapshot
debian/list-deps
docs/CAS/CASProxy/examples/koha_webservice.pl
docs/CAS/CASProxy/examples/proxy_cas.pl
docs/CAS/CASProxy/examples/proxy_cas_callback.pl
docs/CAS/CASProxy/examples/proxy_cas_data.pl
Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
With bug 18696 we need a few tiny changes to build-git-snapshot:
- Debian revision number for debian/changelog
- "orig" in the file name for the tar.gz archive
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
CAVEAT: This patch is only about allowing koha-plack to start a debugging
session on a remote target. Configuring all the needed pieces to make it
work is out of the scope of the bug. Testing should be focused (mainly) on
making sure this introduces NO REGRESSIONS on regular use (i.e. not debugging).
This patch adds the following option switches to koha-plack:
--debugger
----------
Toggle debugging
--debugger-key
--------------
Some IDEs require a key, this needs to match because they are picky about it
--debugger-location
-------------------
This option switch is used to specify the host:port your IDE is listening at.
Inside kohadevbox (using Vdebug with Vim) this would be localhost:9000. Outside
kohadevbox it would be 192.168.50.1:9000
--debugger-path
---------------
This is the path in which you installed the Komodo Remote Debugger library [1]. In kohadevbox
you could put the contents of the downloaded .tar.gz in /home/vagrant/dbgp/perllib. That
perllib seems to be required for things to work [2].
You can test with a simple CLI script things work:
PERL5LIB=/home/vagrant/dbgp/perllib:$PERL5LIB \
PERLDB="BEGIN { require q(/home/vagrant/dbgp/perllib/perl5db.pl) }" \
PERLDB_OPTS="RemotePort=192.168.50.1:9000" perl -d t/Prices.t
If you see action on your IDE, you are on the right track on the IDE side.
To test:
- Apply this patch
- Enable remote debugging on your IDE, on port 9000 (or adjust the command
below to match your IDE's listening port).
- Download the Komodo Remote Debugger package, and place the package's contents
in /home/vagrant/dbgp/perllib (you should see perl5db.pl in there).
- Run:
$ sudo koha-plack --stop kohadev
$ sudo kohaclone/debian/koha-plack --start \
--debugger \
--debugger-path /home/vagrant/dbgp/perllib \
--debugger-location 192.168.50.1:9000 \
kohadev
=> SUCCESS: You IDE/tool gets a connection from the Plack process.
- Sign off :-D
The explanation on how to use it assumes you are running kohadevbox.
WARNING: The main difficulty I found was setting the right dir/file mappings.
[1] http://code.activestate.com/komodo/remotedebugging/
[2] https://github.com/Komodo/KomodoEdit/issues/644#issuecomment-236268012
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
debian/source/format uses 'native'. As Koha is not native Debian software,
and to allow Debian revision numbers like -2 in 16.05.13-2, it should be
changed to 'quilt'.
This is only relevant to packaging and does not affect Koha itself.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
RM note: I forgot this patch (no idea what happened!)
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch makes koha-create (and friends) handle the template_cache_dir
config entry correctly.
It does so by:
- Adding a replaceable string to the template for koha-conf.xml
- Making koha-create-dirs create the needed directories (i.e.
/var/cache/koha/instance and /var/cache/koha/instance/templates)
- Adding a --template-cache-dir switch to koha-create (so sysadmins can
specify their favourite directory for the templates cache).
- koha-remove now takes care of the instance's *templates* dir.
- The install scripts now automatically create /var/cache/koha so it can
be used later by koha-create and friends. It does so the same way it does
for other install-created directories.
To test, you should ideally be able to build your own packages. This
instructions can be followed by people that doesn't have that ability
yet. But can be used on a custom packages setup too.
To test:
- Make sure you have the latest misc4dev in your kohadevbox (if it is a
fresh box you have it already)
- Run:
$ sudo perl misc4dev/cp_debian_files.pl
- Manually create the /var/cache/koha dir (skip if you have your own
packages):
$ sudo mkdir /var/cache/koha
- Create a new instance:
$ sudo koha-create --create-db cachetest
=> SUCCESS:
* /etc/koha/sites/cachetest/koha-conf.xml contains
template_cache_dir and is populated with /var/cache/koha/cachetest/templates
* The directory /var/cache/koha/cachetest/templates exists!
- Create a new instance, pass your own cache dir:
$ sudo koha-create --create-db --template-cache-dir /tmp cachetest2
=> SUCCESS: etc/koha/sites/cachetest2/koha-conf.xml contains template_cache_dir
and is populated with /tmp
- Run:
$ man koha-create
=> SUCCESS: The docs mention the --template-cache-dir option switch
correctly.
- Sign off :-D!
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Following the instructions at:
https://wiki.koha-community.org/wiki/Building_Debian_Packages_-_The_Easy_Way
Receiving the following message in the build:
dpkg-source: warning: relation < is deprecated: use << or <=
This patch tweaks the list-deps.
git diff origin/master -- debian/list-deps shows just the one line
changed from < to << as per the messages suggestion and eythian's
suggestion on IRC:
http://irc.koha-community.org/koha/2017-07-06#i_1950698
The control file can be regenerated from the command-line:
./debian/update-control
However, it will be attached separately.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Original sign off message:
It's impossible to give a test plan for this...
I have implemented a "plugin" for Norwegian ILL (based on NCIP):
https://github.com/Libriotech/koha-illbackend-nncipp
Several issues have been discovered while writing the plugin, and
Alex has fixed them along the way. Currently I do not know about
any funcional issues, and I am happy to sign off.
Update:
I have applied the new patchset and done some exploratory testing,
using the Dummy backend. Everything seems to be fine after the
patches were re-arranged and with the followups from Tomas.
All tests pass.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
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: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds a new command to be used for Elasticsearch-related
tasks.
The current implementation only offers the --rebuild action switch,
that allows reindexing Elasticsearch on a per-instance basis as we are
used to with the rest of the koha-* commands.
Other options could be added in a future: --status (ES server status
report, etc).
To test:
- Apply the whole patchset
- Have a suitable Koha+Elasticsearch setup [1]
- Run:
$ reset_all
- Run:
$ man koha-elasticsearch
=> SUCCESS: A pretty man page is displayed covering all options
- Run:
$ sudo koha-elasticsearch blah
=> SUCCESS: The script fails because blah is not a valid instance name
- Run:
$ sudo koha-elasticsearch -v kohadev
=> SUCCESS: Reindex happens!
- Try the -a, -b and -c option switches
- Sign off happily :-D
Sponsored-by: ByWater Solutions
[1] This is straightforward if you are using KohaDevBox and created the
box using: $ KOHA_ELASTICSEARCH=1 vagrant up
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This follow up should make it work. Perhaps there is a more
elegant way, but wanted to generate something that works.
Before this patch, the --restart stops Zebra, but does not
restart it. After, it does restart.
Before this patch, the --status gives nasty long help.
After this patch, reasonable output.
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds tab-completion for bash, for the koha-zebra script.
To test:
- Run (on the vagrant user):
$ source kohaclone/debian/koha-common.bash-completion
- Run:
$ sudo koha-zebra -<TAB>
(<TAB> means press the tab key)
=> SUCCESS: Tab completion works as expected for the koha-zebra command.
- Sign off :-D
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch adds the new koha-zebra script the ability to handle being
called by other script names, for backwards compatibility with the legacy
koha-*-zebra scripts.
It is intended to be used in conjunction with a patch that replaces the old
koha-*-zebra scripts for symbolic links, pointing to the new koha-zebra script.
To test:
- Apply this patch
- Create symbolic links to the new script:
vagrant@kohadevbox:~$ ln -s kohaclone/debian/scripts/koha-zebra koha-start-zebra
vagrant@kohadevbox:~$ ln -s kohaclone/debian/scripts/koha-zebra koha-stop-zebra
vagrant@kohadevbox:~$ ln -s kohaclone/debian/scripts/koha-zebra koha-restart-zebra
- Run:
$ sudo ./koha-start-zebra kohadev
=> SUCCESS: Same behaviour than the koha-start-zebra script
- Run:
sudo ./koha-stop-zebra kohadev
=> SUCCESS: Same behaviour than the koha-stop-zebra script
- Run:
sudo ./koha-restart-zebra kohadev
=> SUCCESS: Same behaviour than the koha-restart-zebra script
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This script is intended to replace the following currently used scripts
on packages setups:
- koha-start-zebra
- koha-stop-zebra
- koha-restart-zebra
It also introduces a --status option switch, for asking for daemon statuses
To test
- Apply the patch
- Run:
$ sudo debian/scripts/koha-zebra --start kohadev
=> SUCCESS: same behaviour than koha-start-zebra kohadev
- Run:
$ sudo debian/scripts/koha-zebra --stop kohadev
=> SUCCESS: same behaviour as koha-stop-zebra kohadev
- Run:
$ sudo debian/scripts/koha-zebra --restart kohadev
=> SUCCESS: same behaviour than koha-restart-zebra kohadev
- Run:
$ sudo debian/scripts/koha-zebra --status kohadev
=> SUCCESS: It correctly shows the status for the running (or not) process
Play with different combinations of this commands
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
my koha-common.cnf is using this form:
[client]
host=db
user=root
password="move_rootpwd_to_dotenv"
this file is working has expected with mysql tools.
but koha-create parsing will not find the db host resulting in
koha-conf.xml containing no values in hostname element.
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: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This patch simplifies the koha-foreach script, making it use koha-shell
to gain instance privileges and have all environment variables set.
To test:
- Apply the patch
- Have one or more instances created (kohadev already exists in kohadevbox, add
another onewith $ sudo koha-create --create-db test)
- Run:
$ sudo kohaclone/debian/scripts/koha-foreach echo "This is instance __instancename__"
=> SUCCESS: The script runs gracefuly, and outputs something like:
This is instance kohadev
This is instance test
Note: this means the command was executed for each instance and the current behaviour
of replacing the placeholder __instancename__ for the actual instance name still
works as expected.
- You can try the different filter switches, but the logic has not been touched. only the
command call.
- Sign off :-D
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
TEST PLAN
---------
apply bugs 9409 and 14533 (order is irrelevant)
trigger message about missing database name
-- notice it fails to mention dbhost
apply this patch
trigger message again
-- notice it mentions dbhost
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This allows setting the remote db host correctly for
request-db either with a command-line or passwd file.
Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Test plan:
1. Run: debian/scripts/koha-create --request-db
-> Without patch you see the getent error message
-> With patch you see usage and "Missing instance name" message
Signed-off-by: Dilan Johnpulle <dilan@calyx.net.au>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This patch adds a default configuration entry for elasticsearch. It will
add localhost:9200 to the server subsection, and koha_instance (replacing instance
for the corresponding instance name) for the namespace.
To test:
- Apply the patch
- Copy the file to the /etc/koha dir:
$ sudo cp kohaclone/debian/templates/koha-conf-site.xml.in /etc/koha
- Create a new instance:
$ sudo koha-create --create-db test
=> SUCCESS: /etc/koha/sites/test/koha-conf.xml includes the mentioned section:
<elasticsearch>
<server>localhost:9200</server>
<index_name>koha_test</index_name>
</elasticsearch>
- Sign off :-D
Note: As the use of ES is syspref driven, this default entry doesn't have any use
until ES is installed and SearchEngine set to Elasticsearch. So it doesn't hurt
but will help end users test the ES integration. Advanced users will take care of
this config entry manually (pointing to external servers/clusters, etc).
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Newer versios of perl-modules have a version number in the package name.
This patch makes Koha aware of perl-modules-5.22 and perl-modules-5.24
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
typo responsability
typo defautl in authorities.pref
typo reveived in t/db_dependent/Acquisition.t
typo ;; in advance_notices.pl
typo Stopping in restart_indexer (koha-indexer)
typo instutitional in moremember.pl
typo Corretly (Biblio.t)
typo periodicy in help serials
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: Kyle M Hall <kyle@bywatersolutions.com>
Bug 16749 introduced a nice way to have flexible paths. During the discussion on how to do it, we moved from having it contain the path to the git dir to just a boolean. The 'koha-shell' script didn't get attention it seems, and it is broken on dev installs.
This was hidden by the fact that many of us run dev installs on kohadevbox, which sets a .bashrc file for de instance's user, containing the right path when opening the new shell.
This patch changes the logic so on a dev install, intranetdir is picked as the right path. This is how it is handled in koha-functions.sh
To test:
- On kohadevbox, run:
$ sudo koha-shell kohadev -c "perl misc4dev/populate_db.pl"
=> FAIL: C4/Installer.pm not found on PERL5LIB error.
- Apply this patch
- Replace /usr/bin/koha-shell with debian/scripts/koha-shell
$ sudo cp kohaclone/debian/scripts/koha-shell /usr/bin/koha-shell
- Run:
$ sudo koha-shell kohadev -c "perl misc4dev/populate_db.pl"
=> SUCCESS: No warning about missing libs is raised.
- Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The new switch for deleting temporary uploads in cleanup_database can
be added to cron.
Note: Since the option --temp-uploads does only purge temporary uploads
when triggered by the preference Upload_PurgeTemporaryFiles_Days, it can
be safely added here.
Test plan:
There is actually nothing to test here if you followed the preceding test
plans. Just verify that the switch is inserted ocrrectly.
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>
koha-plack --stop doesn't ensure that Plack was really stopped before
returning
So in case that koha-plack --stop was quickly follows by koha-plack
--start (e.g. logrotate), it could leave Plack in stop state. This is
due to koha-plack --start think that Plack was already started, while it
actually is being stopped.
For me I think this is the cause why I got random Plack stop when
logrotate is run.
It should be similar to the case of Zebra in Bug #16885, and the
solution might be the same: adding "--retry=TERM/30/KILL/5;" to
start-stop-daemon command.
TEST PLAN
---------
1) Login to staff client and do something that will hold connection for
a long time, e.g. a batch import or a slow report.
2) sudo koha-plack --stop mykoha
3) ps aux | grep plack <-- a Plack process will still running work in
1)
4) wait for 1) to finish and all Plack processes exit
5) sudo koha-plack --start mykoha
6) apply the patch
7) repeat step 1)-2)
8) ps aux | grep plack <-- There should be no Plack process running
now
9) Note that work in step 1) might get terminated midway. Since we force
Plack to stop after some wait.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
The Debian cron file and the misc crontab example are updated.
A message is printed when upgrading.
Note: At this moment the merge cron job is run once a day. This is imo a
good starting point. The load for this job greatly depends on the value of
pref AuthorityMergeLimit. Of course you can schedule the job more often,
and if this need is felt more globally, we can adjust it later.
Test plan:
[1] Run the dbrev and see the message.
[2] Read the changes to the cron files.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Bug 17731 removed the -x option of rebuild_zebra but koha-rebuild-zebra
still cals the script with this option.
"Warning: You passed -x which is already the default and is now deprecated"
Test plan:
sudo koha-rebuild-zebra -f
should no longer raise the warning
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
Check if the instance does not exist (or was not even passed).
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
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