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>