Commit graph

22 commits

Author SHA1 Message Date
385c16174b Bug 17468: Remove koha-*-zebra scripts and its traces
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>
2018-03-26 17:31:27 -03:00
3cb853ed8f Bug 19462: Add a koha-elasticsearch command
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>
2017-10-27 14:10:31 -03:00
8003dde3c9 Bug 17467: (follow-up) Make the install script install koha-zebra
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>
2017-10-27 14:10:30 -03:00
4e7734ce33 Bug 16016: Sitemap handling scripts for packages
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>
2016-05-04 13:34:21 +00:00
78a6f7b0e7 Bug 13143 - Add a tool to show a Koha's password
to test...

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

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

Missing instance name...

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

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

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

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

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

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

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-01-27 06:27:07 +00:00
4adc4ee5f8 Bug 13791: Plack out-of-the-box support on packages
This patch introduces a koha-plack script that controls running Plack
processes for each instance. They are run using 'starman', listening
on a Unix Domain Socket (UDS):

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

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

  /etc/koha/plack.psgi

and is installed by the package.

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

 - is_plack_enabled
 - is_plack_running

Done:
- koha-plack script
- suitable psgi file

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

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

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
2015-08-24 13:00:39 -03:00
eed7f263d0 Bug 8773 - Start per-instance koha-index-daemon in .deb setup
Short:

Launch an indexing daemon (rebuild_zebra.pl -daemon) process for each
enabled instance. Enabling/disabling the use of the indexer is handled
by global configuration variables in /etc/default/koha-common.

Also provides command line tools to manage the running indexer daemons
for your instances.

Long:

Using an indexing daemon avoids launching a new interpreter each time
the cron triggers the indexing, and also allows sub-minute incremental
reindexing, a requirement from our librarians.[1]

Using the indexer daemon could remain "experimental" until it gets more
testing; so is disabled by default initially. To enable the use of the
indexer the user has to tweak the /etc/default/koha-common config file.
Specifically the USE_INDEXER_DAEMON variable, which is clearly explained
in the file.

Frecquency defaults to 5 sec, and can be changed by tweaking the
/etc/default/koha-common config file too.

This patch uses rebuild_zebra.pl in daemon mode, but it is crafted to
allow changing the indexing daemon and passing specific option switches
it might need.

Regards
To+

[1] This is the .deb version of http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8519

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-14 09:15:22 -03:00
624c953b35 Bug 11404: Make the install process aware of the changes
This patch makes the install scripts take care of the new file
and prompt for user confirmation on the apache file renaming step.

Both prompt and the renaming actions depend on the fact that there
are instances with their files missing the .conf appendix.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-19 21:50:54 +00:00
b7cd95bcc9 Bug 10802: make Debian package install history.txt
While bug 8911 fixed a problem regarding history.txt, a proper fix for
packages was missing.
This patch does three things:

 - Adds docs/history.txt to debian/koha-common.docs so it gets installed.
 - Moves the line installing the release notes from debian/koha-common.install
   to debian/koha-common.docs.
 - Adds an override_dh_compress entry in debian/rules that excludes
   history.txt from the dh_compress routine [1]

To test:
 - Take a picture of how /usr/share/doc/koha-common looks.
 - Apply the patch and build a package.
 - Upgrade and/or install using your package.
 - Look for the contents of the /usr/share/doc/koha-common, it should
   look the same, but history.txt must be there.
 - More > About Koha > Koha Timeline should show the history lines.

[1] As 'man dh_compress' says, it is needed as every file considered for
    the doc dir that is plain text and is more than 4k size will be
    gzipped unless stated otherwise. We need it uncompressed for about.pl.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 15:27:16 +00:00
Robin Sheat
3dc22e7fb2 Bug 9250 - [SIGNED-OFF] provide commands to manage the SIP server
This adds commands required to control the SIP server. These commands
are:
* koha-enable-sip - copies the SIP config to the sites directory
* koha-start-sip - starts the SIP server processes
* koha-stop-sip - stops the SIP server processes

It also calls these as appropriate from the koha-common init script.

To use:
1) sudo koha-enable-sip instancename
2) sudo vim /etc/koha/sites/instancename/SIPconfig.xml
   Do whatever is needed for your site's SIP configuration
3) sudo koha-start-sip instancename

To test:
1) Build packages with this patch
2) Ensure that sudo koha-start-sip instancename doesn't do anything
3) Run sudo koha-enable-sip instancename
4) Edit /etc/koha/sites/instancename/SIPconfig.xml if needed (probably
   not required for testing)
5) Run sudo koha-start-sip instancename
6) Note that the sip processes are now running
7) Run sudo koha-stop-sip instancename
8) Note that the sip processes have gone
9) Reboot your Koha server
10) Note that the sip processes are back

Sponsored-By: Waitaki District Council Libraries
Sponsored-By: South Taranaki District Council Libraries
Sponsored-By: Horowhenua District Council Libraries
Sponsored-By: Rangitikei District Council Libraries

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as advertised. koha-start-sip without a prior koha-enable-sip
does nothing. koha-enable-sip copies the SIP config file to the
instance directory. After koha-enable-sip, koha-start-sip and
koha-stop-sip works as expected. After a reboot, the SIP processes are
still running. I have not actually tested the SIP servers after they
have been started, but assume they work the same as always.
The man pages look good.

The new commands should also have been added to the man page for
koha-common. I'll do a followup for that.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-01 22:03:13 -04:00
2cd5afa974 Bug 10041 - Provide a koha-translate script to aid package users on installing translations
Until we have solved the packaging of koha template translations, provide a command that manages the installed translations in a proper way.

To test, build a Debian package of current master+the patches from this bug :-D and try the many options running koha-translate --help provide.

The command itself can be grabbed from a git checkout with this patch applied to test the script's funcionality. If it (and its docs) fits the package building stuff, I'll test on monday when I can be back on my workstation.

Sponsored-by: Universidad Nacional de Córdoba

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Comment: Good adition. Work as described. No errors.
Copied to /usr/local/bin. No errors on install, update, remove, list and check.
Passed-QA-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-05-01 22:02:16 -04:00
Jared Camins-Esakov
09de3b93be Bug 9239 follow-up: update koha-conf.xml
The previous patches were missing the koha-conf.xml updates. This patch
updates koha-conf.xml and makes the changes neccessary to include the
QueryParser configuration file in the packages.

To test:
1) Run Makefile and check generated koha-conf.xml to confirm that the
   line <queryparser_config>...</queryparser_config> is there with an
   absolute path.
2) That was it.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Tested update successfully - new line now shows up and
query parser is used.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-03-16 21:32:33 -04:00
Robin Sheat
0e5246d7f7 Bug 8878 - a command to provide a shell with the koha environment
This command behaves something like su(1), but provides you with a shell
as the koha user, and with the environment pointing to the right places.

Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-20 08:01:46 -05:00
Robin Sheat
9d3a8d9865 Bug 4877 [ENH] [SIGNED-OFF] install generated man pages with build process
This uses the docbook source files to generate the man pages, and
installs them to their correct location when the packages are being
built.

This will make it easier for people to write man pages, thereby ensuring
that people join in keeping documentation up to date.

Note: adds docbook-xsl and xsltproc to the dependencies.
Note2: applies on top of Magnus' other patch on this ticket.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-16 13:51:26 +12:00
Robin Sheat
73992e2ff4 Bug 6486 - make koha-mysql get installed with the packages
A useful addition I overlooked.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-18 21:20:57 +12:00
Robin Sheat
3e34c65f92 Bug 6275 - allow automated backups for packages
This causes backups for the last two days to be stored by default. The
backups will go into /var/spool/koha.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-08-11 12:45:53 +12:00
Robin Sheat
c779f2b380 Bug 6361 - make the packages work with koha 3.4
This commit does the following:
* Merge the changelog from the releases of 3.2
* Adds a command 'koha-upgrade-to-3.4' that does the MARC item splitting
  stuff.
* Adds a debconf note to make sure people know that they need to run
  the above command.
* Fixes the inclusion of jQuery in the packages.
* Makes build-git-snapshot build packages with a 3.5 version.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-06-03 11:06:31 +12:00
Robin Sheat
18a1c3db11 Bug 5139 - packages now do email and other cron jobs
By default the packages now set up the cron jobs to handle things like
overdues and email etc. By default, email is off, 'koha-email-enable'
and 'koha-email-disable' can manage this.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 08:12:14 -04:00
Lars Wirzenius
a9f918a8ae Install the admin scripts.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-25 08:04:32 -04:00
Lars Wirzenius
71e585df2f Add koha-disable, a script to disable a Koha instance.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-25 07:59:29 -04:00
Lars Wirzenius
483ef82cd3 Add koha-post-install-setup, a script to be run by sysadmin post-install.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-25 07:59:19 -04:00
Lars Wirzenius
27c6ab764c Split off koha-common.
koha-common will be suitable for hosts with multiple Koha instances,
or those that otherwise need to do thing differently from the main
koha package.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-05-25 07:58:56 -04:00