As rss.pl is not a CGI script, moved it to join the
other cronjobs. Full documentation of the script
is in misc/cronjobs/rss/rss.pl, but to summarize:
[1] rss.pl is run on the command line to produce
an RSS XML document. The output should be
placed in a directory accessible to the OPAC
(or staff) web interface so that users can download
the RSS feed. An example of usage:
misc/cronjobs/rss.pl lastAcquired.conf
Normally rss.pl should be run periodically (e.g., daily)
to keep the feed up-to-date.
[2] The configuration file (e.g., lastAcquired.conf) lists
* name of the template file to use
* path of output file
* SQL query
rss.pl runs the SQL query, then feeds the output of the
query through the template to produce the output file.
[3] The template file (e.g., lastAcquired.tmpl) uses
HTML::Template syntax like any of the HTML
templates for the web interface.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Recently, there were changes to the Makefile.PL to make it install in a
DESTDIR that the OS (debian) may choose. This broke the test suite.
Since we're not installing the stuff in the t/ directory, we need to
ignore the DESTDIR specifiation before we write the test-config.txt.
So, this patch adds a call to the _strip_destdir function for all
directories written to the t/test-config.txt file.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This is the script that generates the patron and holdings database for the offline circ module. I
touched up a few parts of it:
* fixed the database syntax to squash a bug or two
* extracted some methods for readability and reuse
* added some documentation
* added a --file and --force command line argument
* made it die if DBD::SQLite is not present. That module is required for this feature.
Here's an example crontab line that will generate the borrowers.db file each midnight.
0 0 * * * create_koc_db.pl --file /tmp/borrowers.db
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This patch removes Image::Magick as a dependency and replaces it with
the (much) lighter GD. Functionality of patronimage code has not changed with
this conversion.
Adding errorhandling for corrupted image file and link to return to moremember.pl when called from there
Added notes about supported image mime types.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
There has been a report of difficulties installing MIME::Lite 3.01. Only 3.0 is really necessary, so I'm relaxing the requirements.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
formerly, the overdues cronjobs were crafting their own MIME message attachments (poorly). This
patch adds a dependency on MIME::Lite, the de facto standard perl module for forming usable
emails with MIME attachments. MIME::Lite is pure perl and well supported on numerous platforms:
http://testers.cpan.org/show/MIME-Lite.html
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
SMS::Send is used by the new enhanced messaging stuff. It's a pure-perl module that
provides a consistent interface to SMS sending gateways. There are alredy
a handful of driver modules for gateways on CPAN, and adding one for a new gateway
is possible.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This patch requires that the test database name be different from the production database name.
The object here is to prevent people from specifying the same database for both, and then
losing all of their data in the production database.
This may cause problems for people who want to do that, though I consider that bad practice.
It may also cause problems for people if they have two different servers, each with identically
named database, and they want to use one for testing and the other for production. If we ever
find that someone like that exists, we can deal with that case.
I don't think there are any necessary documentation changes here yet since we're recommending
that users answer "no" to the question about setting up a test database.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
If running Zebra, try to locate zebrasrv and zebraidx
so that koha-zebra-ctl.sh can point to a functioning
zebrasrv.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
I'm adding some more warnings in Makefile.PL to indicate that you WILL lose the data
in your testing database.
I've also relaxed the requirement that the teting database have "test" in its name.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The daemon control scripts (koha-zebra-ctl.sh, koha-zebraqueue-ctl.sh,
and koha-pazpar2-ctl.sh) are now copied and installed in a
runnable fashion for a 'dev'-mode install. By default
they are installed in the bin subdirectory of the runtime
directory.
Also:
* the control scripts now work if the EUID is other
than root (as would be expected for a 'dev' or 'single'
install).
* Split the SCRIPT_DIR installation target into
SCRIPT_DIR (scripts to copy regardless of install mode)
and SCRIPT_NONDEV_DIR (scripts to copy to SCRIPT_DIR
unless the install mode is 'dev').
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* All configuration and run-time files created during
a test suite run now live under t/run
* made sure scripts copied to t/run/bin are executable
* added t/run and t/test-config.txt to .gitignore
Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
I'm adding a bunch of additions to the test suite. There is now a test
database that is created, and a test instance of the zebra server and
daemon that are run before the tests in t/database-dependent.pl are
run. This means that you can test things that insert (or destroy)
things in the database.
To use these tests, after you 'make' your koha installation, you can
change to the 't' directory and 'make test' there.
There is now an additional question asked during installation. It asks
whether you would like to run the data-dependent tests. If so, It asks
you for some login information to a test database. I recommend that
you do not not use your production database here. It will delete all
of the data in it.
Things that need improvement:
* I suspect that there are large parts that are not very platform
independent, so they will need to be improved.
* There are some parts of the installer that will probably be
refactored to let this work a little bit better, including being run
directly from a main-level 'make' target at some point.
* Lots more tests to add. Be bold! (see the t/lib directory)
* other tests in t/*.t can possibly benefit from being included in here.
There are two required perl modules for this part of the test suite. I
use:
'Test::Class' => 0.028,
'Test::Class::Load' => 0.02,
They are not listed as requirements in the top-level Makefile.PL
because they're not actually required to install or use Koha, but if
you want to run the test suite, you can install them from CPAN.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
INTRANET_TMPL_DIR
INTRANET_WWW_DIR
OPAC_TMPL_DIR
OPAC_WWW_DIR
KOHA_CONF_DIR
OPAC_TMPL_DIR
OPAC_WWW_DIR
PAZPAR2_CONF_DIR
ZEBRA_CONF_DIR
For each directory on the list, if an existing file
installed file is different from the version
coming from the new package, it is copied to a backup file
whose name will have the suffix "_koha_<old_version_number>"
or "_upgrade_backup", depending on whether
the --prev-install-log option was used or not
during 'perl Makefile.PL'.
The directories whose files were backed up were
chosen because they contain configuration and
HTML files that a non-programmer Koha user
is likely to change. Consequently, the backup
files produced by 'make upgrade' are not a substitute
for doing a complete backup of one's Koha
installation before upgrading.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
All new authority features will be based on the DOM indexing.
To update an existing installation, do the following:
[1] run perl Makefile.PL
[2] make
[3] make update_zebra_conf
[4] copy the new koha-conf.xml to $KOHA_CONF
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
KOHA_CONF now set to blib/KOHA_CONF_DIR/koha-conf.xml
for the purpose of running the test suite.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This target is meant to allow the easy updating
of the Zebra configuration files from an installation
package.
This has been tested for a 'dev' mode install, not
for the other types.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This version of DBD::mysql is required in order to have
proper handling of UTF8 strings.
Also bumped version of YAML::Syck down to 0.71 to
match Debian stable package.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
When using mysql and a sufficiently recent version
of DBD::mysql that actually respects the mysql_enable_utf8
option, setting the current branch to a name that
includes a diacritic causes the session to fail
and forces the user to the login screen upon
clicking another link.
This turned out to be due to the default (Data::Dumper)
serialization used by CGI::Session, which truncated the
session object at the diacritic. By enabling
that module's YAML serialization option, the problem
was resolved.
This patch introduces a dependency on the YAML::Syck
module.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
[1] Map new directory misc/bin to SCRIPT_DIR
instead of SCRIPT_DIR/bin.
[2] rewrite-config.PL no longer removes execute mode
[3] Add new Zebra startup script to rewrite-config.PL
list.
[4] Added KOHA_USER and KOHA_GROUP to rewrite-config.PL
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
* rewrite-config.PL now puts in installed location
of koha-conf.xml in C4/Context.pm so that
correct config can be found even when
KOHA_CONF is not set. Note that setting KOHA_CONF
will still override path set by installer.
* changed references from koha.xml to koha-conf.xml
* renamed EXAMPLE_DIR to MISC_DIR
* assigned installation targets for a couple more files
* changed ZOOM module dependency back to Net::Z3950::ZOOM
(installing that module from CPAN will also install ZOOM,
and ZOOM.pm does not export $VERSION for the dependency
check).
* more work to make 'single' and 'dev' install modes function
* set permissions of installed files -- all files now
writeable by the Koha user
Option to specify a non-root user and group to own
Koha's files applies only to INSTALL_MODE=standard; the
other two installation modes are not meant to have
'make install' run as root.
skel directory is for the installer only; contains
a directory structure and dummy READMEs used for
setting up the Zebra runtime and data directories.
Moved non-config files from etc/zebradb/* to
appropriate places under skel.
* plain 'make' now stages everything to blib, leaving
actual installation to 'make install'
* adjusted rewrite-config.PL and config files
for new subtitution variables
* added default SetEnv Perl5Lib to
koha-httpd.conf
[Galen's note: during patch merge, ended up setting default
INSTALL_BASE back to /usr instead of /usr/local. This
needs to be examined again to see if C4 perl modules
should go under /usr/local/lib instead of /usr/lib
in Debian.]
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
MARC::File::XML => 0.88 as part of fixing bug 1504
in turn MARC::Charset => 0.98 and MARC::Record => 2.00.
Previous required version of MARC::Record was 1.38, but
since that is three years old, assuming that most Koha
3.0 dev and testing has been done with version 2.0.0.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
HTML::Template is not necessary anymore (replaced by H::T::Pro)
Net::Z3950, Net::Z3950 and ZOOM are the same. ZOOM being the preffered package name
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
- Data::Random is not necessary. I don't have it & have no problems
- HTML::Tree was used in the 1st versions of the translator. I don't have it installed, it is useless now
Signed-off-by: Chris Cormack <crc@liblime.com>