[Koha-devel] RFC - installer changes

Galen Charlton galen.charlton at liblime.com
Wed Dec 12 19:56:06 CET 2007


Hi,

I have made a number of changes to the installer and now have a
version ready for general review.  My git branch and the results can
be accessed as follows:

git repo:

http://manage-gmc.dev.kohalibrary.com/koha-installer.git

gitweb:

http://manage-gmc.dev.kohalibrary.com/cgi-bin/gitweb.cgi?p=koha-installer.git;a=summary

Tarball with the revised installer:

http://manage-gmc.dev.kohalibrary.com/koha-3.00.00.032.tar.gz

Changes include:

* Prompting for more configuration information during perl Makefile.PL
* Introduction of three installation modes:
** 'standard': typical install as root
** 'single': install everything under one subdirectory; meant for
users who do not have root on their host but are allowed to install
software.
** 'dev': run as much as possible from a git checkout
* Improved conformance with FHS and Debian web application guidelines,
particular in 'standard' mode.
* Improved support for specifying where each logical installation
target should go.
* Replaced glob with a directory walk to identify files to be
installed (thanks fbcit!).
* Separation of Zebra configuration and data files in 'standard' mode.
* Adjustment of Zebra configuration file layout.  All Zebra config
files in the Koha package are now installed and are available for use;
the installer now simply sets profilePath to control which MARC and
language options are in effect.
* During 'standard' install, ownership of Koha's files can now be
assigned to a non-root user (which should be different from the httpd
user, of course).  This allows most Koha server-side administration
and web design tasks to be done without requiring root access.
* Files are now installed with u+w.
* By default the C4 Perl modules are bundled with the rest of Koha's files.
* 'make test' now enabled
* 'make' now just stages files in blib; nothing is actually installed
until you do 'make install'
* general bugfixes

I should emphasize that by default the C4 modules are installed along
with the rest of the Koha files, e.g. in /usr/share/koha/lib.  They
are not installed in any of the standard Perl module directories,
although a packager could choose to put them there by setting
PERL_MODULE_DIR when running perl Makefile.PL.

As a consequence, this means that by default use of the PERL5LIB
environment variable is necessary; 'make install' now prints a message
suggesting the the user set KOHA_CONF and PERL5LIB in their profile.
The default koha-httpd.conf now includes both of these variables.

My main reason for doing this by default is that the C4 modules have
at present no independent use outside of supporting Koha's CGI scripts
and are intimately tied to the version of those scripts.  Putting them
in the default @INC will risk problems for users who need to run
multiple versions of Koha on a box.

Requiring use of PERL5LIB is not perfect, but it should be noted that
we already have one required environment variable in the form of
KOHA_CONF.  If it is thought that this would cause too many problems,
I would consider use of FindBin and use lib along with using
rewrite-config.PL to set the correct module path in the command-line
scripts.

Related to this, I think it will be useful to consider specifying the
version number when doing 'use C4::*' from the scripts, and possibly
consider use of the 'only' pragma [1].

I would like to request that interested developers and users test the
installer and provide feedback, debate, flames, etc. to koha-devel.
My testing was done solely on Debian Etch, by the way.  Also, please
note that my repository was cloned from HEAD almost two weeks ago and
I have not yet  merged in current work, so please bear that in mind.

Thanks to Henri-Damien Laurent, Chris Nighswonger, and Chris Cormack
for contributing patches so far, and thanks to MJ Ray for creating the
current installer on which my work was based.

Regards,

Galen
-- 
Galen Charlton
Koha Application Developer
LibLime
galen.charlton at liblime.com
p: 1-888-564-2457 x709

[1]: http://www.perl.com/pub/a/2003/03/18/only.html





More information about the Koha-devel mailing list