|
Lines 379-389
Name of DBMS user account for Koha's database.
Link Here
|
| 379 |
|
379 |
|
| 380 |
Pasword of DMBS user account for Koha's database. |
380 |
Pasword of DMBS user account for Koha's database. |
| 381 |
|
381 |
|
| 382 |
=item INSTALL_ZEBRA |
|
|
| 383 |
|
| 384 |
Whether to install Zebra configuration files and data |
| 385 |
directories. |
| 386 |
|
| 387 |
=item ZEBRA_MARC_FORMAT |
382 |
=item ZEBRA_MARC_FORMAT |
| 388 |
|
383 |
|
| 389 |
Specifies format of MARC records to be indexed by Zebra. |
384 |
Specifies format of MARC records to be indexed by Zebra. |
|
Lines 420-426
my %config_defaults = (
Link Here
|
| 420 |
'DB_NAME' => 'koha', |
415 |
'DB_NAME' => 'koha', |
| 421 |
'DB_USER' => 'kohaadmin', |
416 |
'DB_USER' => 'kohaadmin', |
| 422 |
'DB_PASS' => 'katikoan', |
417 |
'DB_PASS' => 'katikoan', |
| 423 |
'INSTALL_ZEBRA' => 'yes', |
|
|
| 424 |
'INSTALL_SRU' => 'yes', |
418 |
'INSTALL_SRU' => 'yes', |
| 425 |
'INSTALL_PAZPAR2' => 'no', |
419 |
'INSTALL_PAZPAR2' => 'no', |
| 426 |
'AUTH_INDEX_MODE' => 'dom', |
420 |
'AUTH_INDEX_MODE' => 'dom', |
|
Lines 474-480
else {
Link Here
|
| 474 |
my %valid_config_values = ( |
468 |
my %valid_config_values = ( |
| 475 |
'INSTALL_MODE' => { 'standard' => 1, 'single' => 1, 'dev' => 1 }, |
469 |
'INSTALL_MODE' => { 'standard' => 1, 'single' => 1, 'dev' => 1 }, |
| 476 |
'DB_TYPE' => { 'mysql' => 1, 'Pg' => 1 }, |
470 |
'DB_TYPE' => { 'mysql' => 1, 'Pg' => 1 }, |
| 477 |
'INSTALL_ZEBRA' => { 'yes' => 1, 'no' => 1 }, |
|
|
| 478 |
'INSTALL_SRU' => { 'yes' => 1, 'no' => 1 }, |
471 |
'INSTALL_SRU' => { 'yes' => 1, 'no' => 1 }, |
| 479 |
'AUTH_INDEX_MODE' => { 'grs1' => 1, 'dom' => 1 }, |
472 |
'AUTH_INDEX_MODE' => { 'grs1' => 1, 'dom' => 1 }, |
| 480 |
'BIB_INDEX_MODE' => { 'grs1' => 1, 'dom' => 1 }, |
473 |
'BIB_INDEX_MODE' => { 'grs1' => 1, 'dom' => 1 }, |
|
Lines 501-507
my %config = get_configuration(\%config_defaults, \%valid_config_values, \%insta
Link Here
|
| 501 |
my ($target_directories, $skip_directories) = get_target_directories(\%config); |
494 |
my ($target_directories, $skip_directories) = get_target_directories(\%config); |
| 502 |
display_configuration(\%config, $target_directories); |
495 |
display_configuration(\%config, $target_directories); |
| 503 |
my $file_map = {}; |
496 |
my $file_map = {}; |
| 504 |
get_file_map($target_map, $dirtree, $file_map, $config{'INSTALL_ZEBRA'} eq "yes" ? 1: 0); |
497 |
get_file_map($target_map, $dirtree, $file_map); |
| 505 |
|
498 |
|
| 506 |
my $pl_files = { |
499 |
my $pl_files = { |
| 507 |
'rewrite-config.PL' => [ |
500 |
'rewrite-config.PL' => [ |
|
Lines 515-552
my $pl_files = {
Link Here
|
| 515 |
], |
508 |
], |
| 516 |
}; |
509 |
}; |
| 517 |
|
510 |
|
| 518 |
if ($config{'INSTALL_ZEBRA'} eq "yes") { |
511 |
push @{ $pl_files->{'rewrite-config.PL'} }, ( |
| 519 |
push @{ $pl_files->{'rewrite-config.PL'} }, ( |
512 |
'blib/ZEBRA_CONF_DIR/etc/passwd', |
| 520 |
'blib/ZEBRA_CONF_DIR/etc/passwd', |
513 |
'blib/ZEBRA_CONF_DIR/zebra-biblios.cfg', |
| 521 |
'blib/ZEBRA_CONF_DIR/zebra-biblios.cfg', |
514 |
'blib/ZEBRA_CONF_DIR/zebra-biblios-dom.cfg', |
| 522 |
'blib/ZEBRA_CONF_DIR/zebra-biblios-dom.cfg', |
515 |
'blib/ZEBRA_CONF_DIR/zebra-authorities.cfg', |
| 523 |
'blib/ZEBRA_CONF_DIR/zebra-authorities.cfg', |
516 |
'blib/ZEBRA_CONF_DIR/zebra-authorities-dom.cfg', |
| 524 |
'blib/ZEBRA_CONF_DIR/zebra-authorities-dom.cfg', |
517 |
'blib/ZEBRA_CONF_DIR/explain-authorities.xml', |
| 525 |
'blib/ZEBRA_CONF_DIR/explain-authorities.xml', |
518 |
'blib/ZEBRA_CONF_DIR/explain-biblios.xml', |
| 526 |
'blib/ZEBRA_CONF_DIR/explain-biblios.xml', |
519 |
'blib/ZEBRA_CONF_DIR/retrieval-info-auth-grs1.xml', |
| 527 |
'blib/ZEBRA_CONF_DIR/retrieval-info-auth-grs1.xml', |
520 |
'blib/ZEBRA_CONF_DIR/retrieval-info-auth-dom.xml', |
| 528 |
'blib/ZEBRA_CONF_DIR/retrieval-info-auth-dom.xml', |
521 |
'blib/ZEBRA_CONF_DIR/retrieval-info-bib-grs1.xml', |
| 529 |
'blib/ZEBRA_CONF_DIR/retrieval-info-bib-grs1.xml', |
522 |
'blib/ZEBRA_CONF_DIR/retrieval-info-bib-dom.xml', |
| 530 |
'blib/ZEBRA_CONF_DIR/retrieval-info-bib-dom.xml', |
523 |
); |
| 531 |
); |
524 |
push @{ $pl_files->{'rewrite-config.PL'} }, ( |
|
|
525 |
'blib/SCRIPT_DIR/koha-zebra-ctl.sh', |
| 526 |
'blib/SCRIPT_DIR/koha-pazpar2-ctl.sh', |
| 527 |
'blib/SCRIPT_DIR/koha-index-daemon-ctl.sh', |
| 528 |
); |
| 529 |
if ($config{'INSTALL_PAZPAR2'} eq 'yes') { |
| 532 |
push @{ $pl_files->{'rewrite-config.PL'} }, ( |
530 |
push @{ $pl_files->{'rewrite-config.PL'} }, ( |
| 533 |
'blib/SCRIPT_DIR/koha-zebra-ctl.sh', |
531 |
'blib/PAZPAR2_CONF_DIR/koha-biblios.xml', |
| 534 |
'blib/SCRIPT_DIR/koha-pazpar2-ctl.sh', |
532 |
'blib/PAZPAR2_CONF_DIR/pazpar2.xml' |
| 535 |
'blib/SCRIPT_DIR/koha-index-daemon-ctl.sh', |
|
|
| 536 |
); |
533 |
); |
| 537 |
if ($config{'INSTALL_PAZPAR2'} eq 'yes') { |
|
|
| 538 |
push @{ $pl_files->{'rewrite-config.PL'} }, ( |
| 539 |
'blib/PAZPAR2_CONF_DIR/koha-biblios.xml', |
| 540 |
'blib/PAZPAR2_CONF_DIR/pazpar2.xml' |
| 541 |
); |
| 542 |
} |
| 543 |
$config{'ZEBRA_AUTH_CFG'} = $config{'AUTH_INDEX_MODE'} eq 'dom' ? 'zebra-authorities-dom.cfg' : 'zebra-authorities.cfg'; |
| 544 |
$config{'ZEBRA_BIB_CFG'} = $config{'BIB_INDEX_MODE'} eq 'dom' ? 'zebra-biblios-dom.cfg' : 'zebra-biblios.cfg'; |
| 545 |
$config{'AUTH_RETRIEVAL_CFG'} = |
| 546 |
$config{'AUTH_INDEX_MODE'} eq 'dom' ? 'retrieval-info-auth-dom.xml' : 'retrieval-info-auth-grs1.xml'; |
| 547 |
$config{'BIB_RETRIEVAL_CFG'} = |
| 548 |
$config{'BIB_INDEX_MODE'} eq 'dom' ? 'retrieval-info-bib-dom.xml' : 'retrieval-info-bib-grs1.xml'; |
| 549 |
} |
534 |
} |
|
|
535 |
$config{'ZEBRA_AUTH_CFG'} = $config{'AUTH_INDEX_MODE'} eq 'dom' |
| 536 |
? 'zebra-authorities-dom.cfg' |
| 537 |
: 'zebra-authorities.cfg'; |
| 538 |
$config{'ZEBRA_BIB_CFG'} = $config{'BIB_INDEX_MODE'} eq 'dom' |
| 539 |
? 'zebra-biblios-dom.cfg' |
| 540 |
: 'zebra-biblios.cfg'; |
| 541 |
$config{'AUTH_RETRIEVAL_CFG'} = $config{'AUTH_INDEX_MODE'} eq 'dom' |
| 542 |
? 'retrieval-info-auth-dom.xml' |
| 543 |
: 'retrieval-info-auth-grs1.xml'; |
| 544 |
$config{'BIB_RETRIEVAL_CFG'} = $config{'BIB_INDEX_MODE'} eq 'dom' |
| 545 |
? 'retrieval-info-bib-dom.xml' |
| 546 |
: 'retrieval-info-bib-grs1.xml'; |
| 547 |
|
| 550 |
|
548 |
|
| 551 |
if ($config{'INSTALL_MODE'} ne "dev") { |
549 |
if ($config{'INSTALL_MODE'} ne "dev") { |
| 552 |
push @{ $pl_files->{'rewrite-config.PL'} }, ( |
550 |
push @{ $pl_files->{'rewrite-config.PL'} }, ( |
|
Lines 630-636
sub get_file_map {
Link Here
|
| 630 |
my $target_map = shift; |
628 |
my $target_map = shift; |
| 631 |
my $dirtree = shift; |
629 |
my $dirtree = shift; |
| 632 |
my $file_map = shift; |
630 |
my $file_map = shift; |
| 633 |
my $install_zebra = shift; |
|
|
| 634 |
my $curr_path = @_ ? shift : ['.']; |
631 |
my $curr_path = @_ ? shift : ['.']; |
| 635 |
|
632 |
|
| 636 |
# Traverse the directory tree. |
633 |
# Traverse the directory tree. |
|
Lines 661-667
sub get_file_map {
Link Here
|
| 661 |
} |
658 |
} |
| 662 |
} |
659 |
} |
| 663 |
if (defined $targetdir) { |
660 |
if (defined $targetdir) { |
| 664 |
_add_to_file_map($file_map, $targetdir, $curr_path, $file, $matchlevel, $install_zebra); |
661 |
_add_to_file_map($file_map, $targetdir, $curr_path, $file, $matchlevel); |
| 665 |
} else { |
662 |
} else { |
| 666 |
my $path = join("/", @$curr_path); |
663 |
my $path = join("/", @$curr_path); |
| 667 |
print "failed to map: $path/$file\n" if $DEBUG; |
664 |
print "failed to map: $path/$file\n" if $DEBUG; |
|
Lines 670-676
sub get_file_map {
Link Here
|
| 670 |
} else { |
667 |
} else { |
| 671 |
# dealing with subdirectory |
668 |
# dealing with subdirectory |
| 672 |
push @$curr_path, $dir; |
669 |
push @$curr_path, $dir; |
| 673 |
get_file_map($target_map, $dirtree->{$dir}, $file_map, $install_zebra, $curr_path); |
670 |
get_file_map($target_map, $dirtree->{$dir}, $file_map, $curr_path); |
| 674 |
pop @$curr_path; |
671 |
pop @$curr_path; |
| 675 |
} |
672 |
} |
| 676 |
} |
673 |
} |
|
Lines 682-688
sub _add_to_file_map {
Link Here
|
| 682 |
my $curr_path = shift; |
679 |
my $curr_path = shift; |
| 683 |
my $file = shift; |
680 |
my $file = shift; |
| 684 |
my $matchlevel = shift; |
681 |
my $matchlevel = shift; |
| 685 |
my $install_zebra = shift; |
|
|
| 686 |
my $dest_path = @_ ? shift : $curr_path; |
682 |
my $dest_path = @_ ? shift : $curr_path; |
| 687 |
|
683 |
|
| 688 |
# The target can be one of the following: |
684 |
# The target can be one of the following: |
|
Lines 709-720
sub _add_to_file_map {
Link Here
|
| 709 |
} else { |
705 |
} else { |
| 710 |
splice @new_dest_path, 0, $targetdir->{trimdir}; |
706 |
splice @new_dest_path, 0, $targetdir->{trimdir}; |
| 711 |
} |
707 |
} |
| 712 |
_add_to_file_map($file_map, $subtarget, $curr_path, $file, $matchlevel, $install_zebra, \@new_dest_path); |
708 |
_add_to_file_map($file_map, $subtarget, $curr_path, $file, $matchlevel, \@new_dest_path); |
| 713 |
} else { |
709 |
} else { |
| 714 |
# actually getting here means that the |
710 |
# actually getting here means that the |
| 715 |
# target was unnecessarily listed |
711 |
# target was unnecessarily listed |
| 716 |
# as a hash, but we'll forgive that |
712 |
# as a hash, but we'll forgive that |
| 717 |
_add_to_file_map($file_map, $subtarget, $curr_path, $file, $matchlevel, $install_zebra); |
713 |
_add_to_file_map($file_map, $subtarget, $curr_path, $file, $matchlevel); |
| 718 |
} |
714 |
} |
| 719 |
} elsif ($targetdir ne 'NONE' and $targetdir ne '') { |
715 |
} elsif ($targetdir ne 'NONE' and $targetdir ne '') { |
| 720 |
my $source = File::Spec->catfile(@$curr_path, $file); |
716 |
my $source = File::Spec->catfile(@$curr_path, $file); |
|
Lines 728-734
sub _add_to_file_map {
Link Here
|
| 728 |
$source =~ s/ /\\ /g; |
724 |
$source =~ s/ /\\ /g; |
| 729 |
$destination =~ s/ /\\ /g; |
725 |
$destination =~ s/ /\\ /g; |
| 730 |
|
726 |
|
| 731 |
$file_map->{$source} = $destination unless (!$install_zebra and $targetdir =~ /ZEBRA/); |
727 |
$file_map->{$source} = $destination; |
| 732 |
} |
728 |
} |
| 733 |
} |
729 |
} |
| 734 |
|
730 |
|
|
Lines 914-1015
Please specify the password of the user that owns the
Link Here
|
| 914 |
database to be used by Koha); |
910 |
database to be used by Koha); |
| 915 |
$config{'DB_PASS'} = _get_value('DB_PASS', $msg, $defaults->{'DB_PASS'}, $valid_values, $install_log_values); |
911 |
$config{'DB_PASS'} = _get_value('DB_PASS', $msg, $defaults->{'DB_PASS'}, $valid_values, $install_log_values); |
| 916 |
|
912 |
|
| 917 |
$msg = q( |
913 |
print q( |
| 918 |
Koha can use the Zebra search engine for high-performance |
914 |
Koha uses the Zebra search engine for high-performance |
| 919 |
searching of bibliographic and authority records. If you |
915 |
searching of bibliographic and authority records. If you |
| 920 |
have installed the Zebra software and would like to use it, |
916 |
have installed the Zebra software |
| 921 |
please answer 'yes' to the following question. Otherwise, |
917 |
); |
| 922 |
Koha will default to using its internal search engine. |
|
|
| 923 |
|
| 924 |
Please note that if you choose *NOT* to install Zebra, |
| 925 |
koha-conf.xml will still contain some references to Zebra |
| 926 |
settings. Those references will be ignored by Koha. |
| 927 |
|
| 928 |
Install the Zebra configuration files?); |
| 929 |
$msg .= _add_valid_values_disp('INSTALL_ZEBRA', $valid_values); |
| 930 |
$config{'INSTALL_ZEBRA'} = _get_value('INSTALL_ZEBRA', $msg, $defaults->{'INSTALL_ZEBRA'}, $valid_values, $install_log_values); |
| 931 |
|
| 932 |
if ($config{'INSTALL_ZEBRA'} eq 'yes') { |
| 933 |
|
918 |
|
| 934 |
if (defined(my $zebra_path = find_zebra())) { |
919 |
if (defined(my $zebra_path = find_zebra())) { |
| 935 |
$config{'PATH_TO_ZEBRA'} = $zebra_path; |
920 |
$config{'PATH_TO_ZEBRA'} = $zebra_path; |
| 936 |
print qq( |
921 |
print qq( |
| 937 |
Found 'zebrasrv' and 'zebraidx' in $zebra_path. |
922 |
Found 'zebrasrv' and 'zebraidx' in $zebra_path. |
| 938 |
); |
923 |
); |
| 939 |
} else { |
924 |
} else { |
| 940 |
print q( |
925 |
print q( |
| 941 |
Unable to find the Zebra programs 'zebrasrv' and 'zebraidx' |
926 |
Unable to find the Zebra programs 'zebrasrv' and 'zebraidx' |
| 942 |
in your PATH or in some of the usual places. If you haven't |
927 |
in your PATH or in some of the usual places. If you haven't |
| 943 |
installed Zebra yet, please do so and run Makefile.PL again. |
928 |
installed Zebra yet, please do so and run Makefile.PL again. |
| 944 |
|
929 |
|
| 945 |
); |
930 |
); |
| 946 |
} |
931 |
} |
| 947 |
|
932 |
|
| 948 |
$msg = q( |
933 |
$msg = q( |
| 949 |
Since you've chosen to use Zebra with Koha, |
934 |
You must specify the primary MARC format of the |
| 950 |
you must specify the primary MARC format of the |
|
|
| 951 |
records to be indexed by Zebra. |
935 |
records to be indexed by Zebra. |
| 952 |
|
936 |
|
| 953 |
Koha provides Zebra configuration files for MARC21, |
937 |
Koha provides Zebra configuration files for MARC21, |
| 954 |
NORMARC and UNIMARC. |
938 |
NORMARC and UNIMARC. |
| 955 |
|
939 |
|
| 956 |
MARC format for Zebra indexing); |
940 |
MARC format for Zebra indexing); |
| 957 |
$msg .= _add_valid_values_disp('ZEBRA_MARC_FORMAT', $valid_values); |
941 |
$msg .= _add_valid_values_disp('ZEBRA_MARC_FORMAT', $valid_values); |
| 958 |
$config{'ZEBRA_MARC_FORMAT'} = _get_value('ZEBRA_MARC_FORMAT', $msg, $defaults->{'ZEBRA_MARC_FORMAT'}, $valid_values, $install_log_values); |
942 |
$config{'ZEBRA_MARC_FORMAT'} = _get_value('ZEBRA_MARC_FORMAT', $msg, $defaults->{'ZEBRA_MARC_FORMAT'}, $valid_values, $install_log_values); |
| 959 |
$msg = q( |
943 |
$msg = q( |
| 960 |
Koha supplies Zebra configuration files tuned for |
944 |
Koha supplies Zebra configuration files tuned for |
| 961 |
searching either English (en) or French (fr) MARC |
945 |
searching either English (en) or French (fr) MARC |
| 962 |
records. |
946 |
records. |
| 963 |
|
947 |
|
| 964 |
Primary language for Zebra indexing); |
948 |
Primary language for Zebra indexing); |
| 965 |
$msg .= _add_valid_values_disp('ZEBRA_LANGUAGE', $valid_values); |
949 |
$msg .= _add_valid_values_disp('ZEBRA_LANGUAGE', $valid_values); |
| 966 |
$config{'ZEBRA_LANGUAGE'} = _get_value('ZEBRA_LANGUAGE', $msg, $defaults->{'ZEBRA_LANGUAGE'}, $valid_values, $install_log_values); |
950 |
$config{'ZEBRA_LANGUAGE'} = _get_value('ZEBRA_LANGUAGE', $msg, $defaults->{'ZEBRA_LANGUAGE'}, $valid_values, $install_log_values); |
| 967 |
|
951 |
|
| 968 |
$msg = q( |
952 |
$msg = q( |
| 969 |
Koha can use one of two different indexing modes |
953 |
Koha can use one of two different indexing modes |
| 970 |
for the MARC bibliographic records: |
954 |
for the MARC bibliographic records: |
| 971 |
|
955 |
|
| 972 |
grs1 - uses the Zebra GRS-1 filter, available |
956 |
grs1 - uses the Zebra GRS-1 filter, available |
| 973 |
for legacy support |
957 |
for legacy support |
| 974 |
dom - uses the DOM XML filter; offers improved |
958 |
dom - uses the DOM XML filter; offers improved |
| 975 |
functionality. |
959 |
functionality. |
| 976 |
|
960 |
|
| 977 |
Bibliographic indexing mode); |
961 |
Bibliographic indexing mode); |
| 978 |
$msg .= _add_valid_values_disp('BIB_INDEX_MODE', $valid_values); |
962 |
$msg .= _add_valid_values_disp('BIB_INDEX_MODE', $valid_values); |
| 979 |
$config{'BIB_INDEX_MODE'} = _get_value('BIB_INDEX_MODE', $msg, $defaults->{'BIB_INDEX_MODE'}, $valid_values, $install_log_values); |
963 |
$config{'BIB_INDEX_MODE'} = _get_value('BIB_INDEX_MODE', $msg, $defaults->{'BIB_INDEX_MODE'}, $valid_values, $install_log_values); |
| 980 |
|
964 |
|
| 981 |
|
965 |
|
| 982 |
$msg = q( |
966 |
$msg = q( |
| 983 |
Koha can use one of two different indexing modes |
967 |
Koha can use one of two different indexing modes |
| 984 |
for the MARC authorities records: |
968 |
for the MARC authorities records: |
| 985 |
|
969 |
|
| 986 |
grs1 - uses the Zebra GRS-1 filter, available |
970 |
grs1 - uses the Zebra GRS-1 filter, available |
| 987 |
for legacy support |
971 |
for legacy support |
| 988 |
dom - uses the DOM XML filter; offers improved |
972 |
dom - uses the DOM XML filter; offers improved |
| 989 |
functionality. |
973 |
functionality. |
| 990 |
|
974 |
|
| 991 |
Authorities indexing mode); |
975 |
Authorities indexing mode); |
| 992 |
$msg .= _add_valid_values_disp('AUTH_INDEX_MODE', $valid_values); |
976 |
$msg .= _add_valid_values_disp('AUTH_INDEX_MODE', $valid_values); |
| 993 |
$config{'AUTH_INDEX_MODE'} = _get_value('AUTH_INDEX_MODE', $msg, $defaults->{'AUTH_INDEX_MODE'}, $valid_values, $install_log_values); |
977 |
$config{'AUTH_INDEX_MODE'} = _get_value('AUTH_INDEX_MODE', $msg, $defaults->{'AUTH_INDEX_MODE'}, $valid_values, $install_log_values); |
| 994 |
|
978 |
|
| 995 |
$msg = q( |
979 |
$msg = q( |
| 996 |
Zebra has two methods to perform records tokenization |
980 |
Zebra has two methods to perform records tokenization |
| 997 |
and characters normalization: CHR and ICU. ICU is |
981 |
and characters normalization: CHR and ICU. ICU is |
| 998 |
recommended for catalogs containing non-Latin |
982 |
recommended for catalogs containing non-Latin |
| 999 |
characters.); |
983 |
characters.); |
| 1000 |
|
984 |
|
| 1001 |
$msg .= _add_valid_values_disp('ZEBRA_TOKENIZER', $valid_values); |
985 |
$msg .= _add_valid_values_disp('ZEBRA_TOKENIZER', $valid_values); |
| 1002 |
$config{'ZEBRA_TOKENIZER'} = _get_value('ZEBRA_TOKENIZER', $msg, $defaults->{'ZEBRA_TOKENIZER'}, $valid_values, $install_log_values); |
986 |
$config{'ZEBRA_TOKENIZER'} = _get_value('ZEBRA_TOKENIZER', $msg, $defaults->{'ZEBRA_TOKENIZER'}, $valid_values, $install_log_values); |
| 1003 |
|
987 |
|
| 1004 |
$msg = q( |
988 |
$msg = q( |
| 1005 |
Please specify Zebra database user); |
989 |
Please specify Zebra database user); |
| 1006 |
$config{'ZEBRA_USER'} = _get_value('ZEBRA_USER', $msg, $defaults->{'ZEBRA_USER'}, $valid_values, $install_log_values); |
990 |
$config{'ZEBRA_USER'} = _get_value('ZEBRA_USER', $msg, $defaults->{'ZEBRA_USER'}, $valid_values, $install_log_values); |
| 1007 |
|
991 |
|
| 1008 |
$msg = q( |
992 |
$msg = q( |
| 1009 |
Please specify the Zebra database password); |
993 |
Please specify the Zebra database password); |
| 1010 |
$config{'ZEBRA_PASS'} = _get_value('ZEBRA_PASS', $msg, $defaults->{'ZEBRA_PASS'}, $valid_values, $install_log_values); |
994 |
$config{'ZEBRA_PASS'} = _get_value('ZEBRA_PASS', $msg, $defaults->{'ZEBRA_PASS'}, $valid_values, $install_log_values); |
| 1011 |
|
995 |
|
| 1012 |
$msg = q( |
996 |
$msg = q( |
| 1013 |
Since you've chosen to use Zebra, you can enable the SRU/ |
997 |
Since you've chosen to use Zebra, you can enable the SRU/ |
| 1014 |
Z39.50 Server if you so choose, but you must specify a |
998 |
Z39.50 Server if you so choose, but you must specify a |
| 1015 |
few configuration options for it. |
999 |
few configuration options for it. |
|
Lines 1019-1082
koha-conf.xml will still contain some references to SRU
Link Here
|
| 1019 |
settings. Those references will be ignored by Koha. |
1003 |
settings. Those references will be ignored by Koha. |
| 1020 |
|
1004 |
|
| 1021 |
Install the SRU configuration files?); |
1005 |
Install the SRU configuration files?); |
| 1022 |
$msg .= _add_valid_values_disp('INSTALL_SRU', $valid_values); |
1006 |
$msg .= _add_valid_values_disp('INSTALL_SRU', $valid_values); |
| 1023 |
$config{'INSTALL_SRU'} = _get_value('INSTALL_SRU', $msg, $defaults->{'INSTALL_SRU'}, $valid_values, $install_log_values); |
1007 |
$config{'INSTALL_SRU'} = _get_value('INSTALL_SRU', $msg, $defaults->{'INSTALL_SRU'}, $valid_values, $install_log_values); |
| 1024 |
|
1008 |
|
| 1025 |
if ($config{'INSTALL_SRU'} eq 'yes') { |
1009 |
if ($config{'INSTALL_SRU'} eq 'yes') { |
| 1026 |
$msg = q( |
1010 |
$msg = q( |
| 1027 |
Since you've chosen to configure SRU, you must |
1011 |
Since you've chosen to configure SRU, you must |
| 1028 |
specify the host and port(s) that the SRU |
1012 |
specify the host and port(s) that the SRU |
| 1029 |
Servers (bibliographic and authority) should run on. |
1013 |
Servers (bibliographic and authority) should run on. |
| 1030 |
); |
1014 |
); |
| 1031 |
$msg = q( |
1015 |
$msg = q( |
| 1032 |
SRU Database host?); |
1016 |
SRU Database host?); |
| 1033 |
$config{'ZEBRA_SRU_HOST'} = _get_value('ZEBRA_SRU_HOST', $msg, $defaults->{'ZEBRA_SRU_HOST'}, $valid_values, $install_log_values); |
1017 |
$config{'ZEBRA_SRU_HOST'} = _get_value('ZEBRA_SRU_HOST', $msg, $defaults->{'ZEBRA_SRU_HOST'}, $valid_values, $install_log_values); |
| 1034 |
|
1018 |
|
| 1035 |
$msg = q( |
1019 |
$msg = q( |
| 1036 |
SRU port for bibliographic data?); |
1020 |
SRU port for bibliographic data?); |
| 1037 |
$config{'ZEBRA_SRU_BIBLIOS_PORT'} = _get_value('ZEBRA_SRU_BIBLIOS_PORT', $msg, $defaults->{'ZEBRA_SRU_BIBLIOS_PORT'}, $valid_values, $install_log_values); |
1021 |
$config{'ZEBRA_SRU_BIBLIOS_PORT'} = _get_value('ZEBRA_SRU_BIBLIOS_PORT', $msg, $defaults->{'ZEBRA_SRU_BIBLIOS_PORT'}, $valid_values, $install_log_values); |
| 1038 |
|
1022 |
|
| 1039 |
$msg = q( |
1023 |
$msg = q( |
| 1040 |
SRU port for authority data?); |
1024 |
SRU port for authority data?); |
| 1041 |
$config{'ZEBRA_SRU_AUTHORITIES_PORT'} = _get_value('ZEBRA_SRU_AUTHORITIES_PORT', $msg, $defaults->{'ZEBRA_SRU_AUTHORITIES_PORT'}, $valid_values, $install_log_values); |
1025 |
$config{'ZEBRA_SRU_AUTHORITIES_PORT'} = _get_value('ZEBRA_SRU_AUTHORITIES_PORT', $msg, $defaults->{'ZEBRA_SRU_AUTHORITIES_PORT'}, $valid_values, $install_log_values); |
| 1042 |
|
1026 |
|
| 1043 |
} |
1027 |
} |
| 1044 |
|
1028 |
|
| 1045 |
$msg = q( |
1029 |
$msg = q( |
| 1046 |
Since you've chosen to use Zebra, you can also choose to |
1030 |
Along with Zebra, you can also choose to install PazPar2, |
| 1047 |
install PazPar2, which is a metasearch tool. With PazPar2, |
1031 |
which is a metasearch tool. With PazPar2, |
| 1048 |
Koha can perform on-the-fly merging of bibliographic |
1032 |
Koha can perform on-the-fly merging of bibliographic |
| 1049 |
records during searching, allowing for FRBRization of |
1033 |
records during searching, allowing for FRBRization of |
| 1050 |
the results list. |
1034 |
the results list. |
| 1051 |
|
1035 |
|
| 1052 |
Install the PazPar2 configuration files?); |
1036 |
Install the PazPar2 configuration files?); |
| 1053 |
$msg .= _add_valid_values_disp('INSTALL_PAZPAR2', $valid_values); |
1037 |
$msg .= _add_valid_values_disp('INSTALL_PAZPAR2', $valid_values); |
| 1054 |
$config{'INSTALL_PAZPAR2'} = _get_value('INSTALL_PAZPAR2', $msg, $defaults->{'INSTALL_PAZPAR2'}, $valid_values, $install_log_values); |
1038 |
$config{'INSTALL_PAZPAR2'} = _get_value('INSTALL_PAZPAR2', $msg, $defaults->{'INSTALL_PAZPAR2'}, $valid_values, $install_log_values); |
| 1055 |
|
1039 |
|
| 1056 |
if ($config{'INSTALL_PAZPAR2'} eq 'yes') { |
1040 |
if ($config{'INSTALL_PAZPAR2'} eq 'yes') { |
| 1057 |
$msg = q( |
1041 |
$msg = q( |
| 1058 |
Since you've chosen to configure PazPar2, you must |
1042 |
Since you've chosen to configure PazPar2, you must |
| 1059 |
specify the host and port(s) that PazPar2 |
1043 |
specify the host and port(s) that PazPar2 |
| 1060 |
uses: |
1044 |
uses: |
| 1061 |
); |
1045 |
); |
| 1062 |
$msg = q( |
1046 |
$msg = q( |
| 1063 |
Zebra bibliographic server host?); |
1047 |
Zebra bibliographic server host?); |
| 1064 |
$config{'MERGE_SERVER_HOST'} = _get_value('MERGE_SERVER_HOST', $msg, $defaults->{'MERGE_SERVER_HOST'}, $valid_values, $install_log_values); |
1048 |
$config{'MERGE_SERVER_HOST'} = _get_value('MERGE_SERVER_HOST', $msg, $defaults->{'MERGE_SERVER_HOST'}, $valid_values, $install_log_values); |
| 1065 |
|
1049 |
|
| 1066 |
$msg = q( |
1050 |
$msg = q( |
| 1067 |
Zebra bibliographic port for PazPar2 to use?); |
1051 |
Zebra bibliographic port for PazPar2 to use?); |
| 1068 |
$config{'MERGE_SERVER_PORT'} = _get_value('MERGE_SERVER_PORT', $msg, $defaults->{'MERGE_SERVER_PORT'}, $valid_values, $install_log_values); |
1052 |
$config{'MERGE_SERVER_PORT'} = _get_value('MERGE_SERVER_PORT', $msg, $defaults->{'MERGE_SERVER_PORT'}, $valid_values, $install_log_values); |
| 1069 |
|
1053 |
|
| 1070 |
$msg = q( |
1054 |
$msg = q( |
| 1071 |
PazPar2 host?); |
1055 |
PazPar2 host?); |
| 1072 |
$config{'PAZPAR2_HOST'} = _get_value('PAZPAR2_HOST', $msg, $defaults->{'PAZPAR2_HOST'}, $valid_values, $install_log_values); |
1056 |
$config{'PAZPAR2_HOST'} = _get_value('PAZPAR2_HOST', $msg, $defaults->{'PAZPAR2_HOST'}, $valid_values, $install_log_values); |
| 1073 |
|
1057 |
|
| 1074 |
$msg = q( |
1058 |
$msg = q( |
| 1075 |
PazPar2 port?); |
1059 |
PazPar2 port?); |
| 1076 |
$config{'PAZPAR2_PORT'} = _get_value('PAZPAR2_PORT', $msg, $defaults->{'PAZPAR2_PORT'}, $valid_values, $install_log_values); |
1060 |
$config{'PAZPAR2_PORT'} = _get_value('PAZPAR2_PORT', $msg, $defaults->{'PAZPAR2_PORT'}, $valid_values, $install_log_values); |
| 1077 |
|
1061 |
|
| 1078 |
} |
|
|
| 1079 |
} |
1062 |
} |
|
|
1063 |
|
| 1080 |
$msg = q( |
1064 |
$msg = q( |
| 1081 |
Use memcached and memoize to cache the results of some function calls? |
1065 |
Use memcached and memoize to cache the results of some function calls? |
| 1082 |
This provides a signficant performance improvement. |
1066 |
This provides a signficant performance improvement. |
|
Lines 1450-1456
sub install {
Link Here
|
| 1450 |
$install .= qq( |
1434 |
$install .= qq( |
| 1451 |
KOHA_INST_$key = blib/$key |
1435 |
KOHA_INST_$key = blib/$key |
| 1452 |
KOHA_DEST_$key = $target_directories->{$key} |
1436 |
KOHA_DEST_$key = $target_directories->{$key} |
| 1453 |
) unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key}; |
1437 |
) unless exists $skip_directories->{$key}; |
| 1454 |
} |
1438 |
} |
| 1455 |
$install .= qq( |
1439 |
$install .= qq( |
| 1456 |
install :: all install_koha set_koha_ownership set_koha_permissions warn_koha_env_vars |
1440 |
install :: all install_koha set_koha_ownership set_koha_permissions warn_koha_env_vars |
|
Lines 1460-1466
install :: all install_koha set_koha_ownership set_koha_permissions warn_koha_en
Link Here
|
| 1460 |
$install .= "\t\$(NOECHO) umask 022; \$(MOD_INSTALL) \\\n"; |
1444 |
$install .= "\t\$(NOECHO) umask 022; \$(MOD_INSTALL) \\\n"; |
| 1461 |
foreach my $key (sort keys %$target_directories) { |
1445 |
foreach my $key (sort keys %$target_directories) { |
| 1462 |
$install .= "\t\t\$(KOHA_INST_$key) \$(KOHA_DEST_$key) \\\n" |
1446 |
$install .= "\t\t\$(KOHA_INST_$key) \$(KOHA_DEST_$key) \\\n" |
| 1463 |
unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key}; |
1447 |
unless exists $skip_directories->{$key}; |
| 1464 |
} |
1448 |
} |
| 1465 |
$install .= "\t\t\$(INST_MAN1DIR) \$(DESTINSTALLMAN1DIR) \\\n"; |
1449 |
$install .= "\t\t\$(INST_MAN1DIR) \$(DESTINSTALLMAN1DIR) \\\n"; |
| 1466 |
$install .= "\t\t\$(INST_MAN3DIR) \$(DESTINSTALLMAN3DIR)\n"; |
1450 |
$install .= "\t\t\$(INST_MAN3DIR) \$(DESTINSTALLMAN3DIR)\n"; |
|
Lines 1470-1477
install :: all install_koha set_koha_ownership set_koha_permissions warn_koha_en
Link Here
|
| 1470 |
# Do not try to change ownership if DESTDIR is set |
1454 |
# Do not try to change ownership if DESTDIR is set |
| 1471 |
if ($config{'INSTALL_MODE'} eq 'standard' and $config{'KOHA_USER'} ne "root") { |
1455 |
if ($config{'INSTALL_MODE'} eq 'standard' and $config{'KOHA_USER'} ne "root") { |
| 1472 |
foreach my $key (sort keys %$target_directories) { |
1456 |
foreach my $key (sort keys %$target_directories) { |
| 1473 |
$install .= "\t\$(NOECHO) if test -z \"\$(DESTDIR)\"; then chown -R $config{'KOHA_USER'}:$config{'KOHA_GROUP'} \$(KOHA_DEST_$key); fi\n" |
1457 |
$install .= "\t\$(NOECHO) if test -z \"\$(DESTDIR)\"; then chown -R $config{'KOHA_USER'}:$config{'KOHA_GROUP'} \$(KOHA_DEST_$key); fi\n" |
| 1474 |
unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key}; |
1458 |
unless exists $skip_directories->{$key}; |
| 1475 |
} |
1459 |
} |
| 1476 |
} else { |
1460 |
} else { |
| 1477 |
$install .= "\t\t\$(NOECHO) \$(NOOP)\n\n"; |
1461 |
$install .= "\t\t\$(NOECHO) \$(NOOP)\n\n"; |
|
Lines 1484-1490
install :: all install_koha set_koha_ownership set_koha_permissions warn_koha_en
Link Here
|
| 1484 |
# of Koha's files to have write permission by default. |
1468 |
# of Koha's files to have write permission by default. |
| 1485 |
foreach my $key (sort keys %$target_directories) { |
1469 |
foreach my $key (sort keys %$target_directories) { |
| 1486 |
$install .= "\t\$(NOECHO) chmod -R u+w \$(KOHA_DEST_$key)\n" |
1470 |
$install .= "\t\$(NOECHO) chmod -R u+w \$(KOHA_DEST_$key)\n" |
| 1487 |
unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key}; |
1471 |
unless exists $skip_directories->{$key}; |
| 1488 |
} |
1472 |
} |
| 1489 |
} |
1473 |
} |
| 1490 |
elsif ($^O eq 'MSWin32' ) { # On Win32, the install probably needs to be done under the user account koha will be running as... |
1474 |
elsif ($^O eq 'MSWin32' ) { # On Win32, the install probably needs to be done under the user account koha will be running as... |
|
Lines 1494-1500
install :: all install_koha set_koha_ownership set_koha_permissions warn_koha_en
Link Here
|
| 1494 |
$install .= qq( |
1478 |
$install .= qq( |
| 1495 |
KOHA_INST_$key = blib/$key |
1479 |
KOHA_INST_$key = blib/$key |
| 1496 |
KOHA_DEST_$key = $target_directories->{$key} |
1480 |
KOHA_DEST_$key = $target_directories->{$key} |
| 1497 |
) unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key}; |
1481 |
) unless exists $skip_directories->{$key}; |
| 1498 |
} |
1482 |
} |
| 1499 |
$install .= qq( |
1483 |
$install .= qq( |
| 1500 |
install :: all install_koha warn_koha_env_vars |
1484 |
install :: all install_koha warn_koha_env_vars |
|
Lines 1504-1510
install :: all install_koha warn_koha_env_vars
Link Here
|
| 1504 |
$install .= "\t\$(MOD_INSTALL) \\\n"; |
1488 |
$install .= "\t\$(MOD_INSTALL) \\\n"; |
| 1505 |
foreach my $key (sort keys %$target_directories) { |
1489 |
foreach my $key (sort keys %$target_directories) { |
| 1506 |
$install .= "\t\t\$(KOHA_INST_$key) \$(KOHA_DEST_$key) \\\n" |
1490 |
$install .= "\t\t\$(KOHA_INST_$key) \$(KOHA_DEST_$key) \\\n" |
| 1507 |
unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or exists $skip_directories->{$key}; |
1491 |
unless exists $skip_directories->{$key}; |
| 1508 |
} |
1492 |
} |
| 1509 |
} |
1493 |
} |
| 1510 |
$install .= "\n"; |
1494 |
$install .= "\n"; |
|
Lines 1522-1530
install :: all install_koha warn_koha_env_vars
Link Here
|
| 1522 |
$install .= "\t\$(NOECHO) \$(ECHO) For other post-installation tasks, please consult the README.\n"; |
1506 |
$install .= "\t\$(NOECHO) \$(ECHO) For other post-installation tasks, please consult the README.\n"; |
| 1523 |
$install .= "\t\$(NOECHO) \$(ECHO)\n"; |
1507 |
$install .= "\t\$(NOECHO) \$(ECHO)\n"; |
| 1524 |
|
1508 |
|
| 1525 |
if ($config{'INSTALL_ZEBRA'} eq "yes") { |
1509 |
$install .= _update_zebra_conf_target(); |
| 1526 |
$install .= _update_zebra_conf_target(); |
|
|
| 1527 |
} |
| 1528 |
|
1510 |
|
| 1529 |
$install .= upgrade(); |
1511 |
$install .= upgrade(); |
| 1530 |
|
1512 |
|
|
Lines 1574-1581
make_upgrade_backup ::
Link Here
|
| 1574 |
foreach my $key (qw/KOHA_CONF_DIR INTRANET_TMPL_DIR INTRANET_WWW_DIR OPAC_TMPL_DIR OPAC_WWW_DIR |
1556 |
foreach my $key (qw/KOHA_CONF_DIR INTRANET_TMPL_DIR INTRANET_WWW_DIR OPAC_TMPL_DIR OPAC_WWW_DIR |
| 1575 |
PAZPAR2_CONF_DIR ZEBRA_CONF_DIR PLUGINS_DIR/) { |
1557 |
PAZPAR2_CONF_DIR ZEBRA_CONF_DIR PLUGINS_DIR/) { |
| 1576 |
$upgrade .= "\t\t\$(KOHA_INST_$key) \$(KOHA_DEST_$key) \\\n" |
1558 |
$upgrade .= "\t\t\$(KOHA_INST_$key) \$(KOHA_DEST_$key) \\\n" |
| 1577 |
unless ($config{'INSTALL_ZEBRA'} ne "yes" and $key =~ /ZEBRA/) or |
1559 |
unless exists $skip_directories->{$key} or |
| 1578 |
exists $skip_directories->{$key} or |
|
|
| 1579 |
not exists $target_directories->{$key}; |
1560 |
not exists $target_directories->{$key}; |
| 1580 |
} |
1561 |
} |
| 1581 |
$upgrade =~ s/\\\n$/\n/; |
1562 |
$upgrade =~ s/\\\n$/\n/; |