From 6aecfa2fdee001de17c2b89e97bbb013e8f55b89 Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Tue, 5 Mar 2013 16:51:51 +0100 Subject: [PATCH] Bug 9256 - Fix search for the packages See the bug for a description of the problem. This patch tries to restore searching for marcflavour != MARC21 as well as allowing instances with different marcflavors to co-exist on the same server. To test: - Do a package install with e.g. the official squeeze-dev packages and create at least two instances, with different marcflavours, e.g.: sudo koha-create --create-db --marcflavor marc21 test1 sudo koha-create --create-db --marcflavor normarc test2 - Run through the web installers for both instances and add a couple of records to each. Wait for the records to be indexed or run indexing manually with sudo koha-rebuild-zebra -f test1 sudo koha-rebuild-zebra -f test2 - Try searching for the records you added. It should work in test1 but not in test2. - Apply the patch and build packages with the build-git-snapshot script - Install the new koha-common package - Create two instances (because of Bug 9754 it is probably best to give the instances different names than the ones you created above, or to do this on a fresh VM or similar) and add records, as described above. Searching should now work equally well for both instances. Please note: Because of Bug 9752 you will have to set marcflavour = NORMARC by hand before you do the searching, if you choose NORMARC as the marc flavour on one of the instances you create. Please note too: I am not confident that this is the perfect solution, so merciless and thorough testing is necessary! ;-) --- Makefile.PL | 1 - debian/templates/koha-conf-site.xml.in | 48 ++++++++++---------- .../templates/marc21-retrieval-info-auth-dom.xml | 22 +++++++++ .../templates/marc21-retrieval-info-auth-grs1.xml | 40 ++++++++++++++++ debian/templates/marc21-retrieval-info-bib-dom.xml | 22 +++++++++ .../templates/marc21-retrieval-info-bib-grs1.xml | 40 ++++++++++++++++ .../templates/normarc-retrieval-info-auth-dom.xml | 22 +++++++++ .../templates/normarc-retrieval-info-auth-grs1.xml | 40 ++++++++++++++++ .../templates/normarc-retrieval-info-bib-dom.xml | 22 +++++++++ .../templates/normarc-retrieval-info-bib-grs1.xml | 40 ++++++++++++++++ .../templates/unimarc-retrieval-info-auth-dom.xml | 22 +++++++++ .../templates/unimarc-retrieval-info-auth-grs1.xml | 40 ++++++++++++++++ .../templates/unimarc-retrieval-info-bib-dom.xml | 22 +++++++++ .../templates/unimarc-retrieval-info-bib-grs1.xml | 40 ++++++++++++++++ etc/zebradb/etc/marc21.mar | 2 + etc/zebradb/etc/normarc.mar | 2 + etc/zebradb/etc/unimarc.mar | 2 + etc/zebradb/etc/usmarc.mar | 5 +- .../marc_defs/marc21/authorities/record.abs | 2 +- etc/zebradb/marc_defs/marc21/biblios/record.abs | 2 +- etc/zebradb/marc_defs/normarc/biblios/record.abs | 2 +- .../marc_defs/unimarc/authorities/record.abs | 2 +- etc/zebradb/marc_defs/unimarc/biblios/record.abs | 2 +- 23 files changed, 409 insertions(+), 33 deletions(-) create mode 100644 debian/templates/marc21-retrieval-info-auth-dom.xml create mode 100644 debian/templates/marc21-retrieval-info-auth-grs1.xml create mode 100644 debian/templates/marc21-retrieval-info-bib-dom.xml create mode 100644 debian/templates/marc21-retrieval-info-bib-grs1.xml create mode 100644 debian/templates/normarc-retrieval-info-auth-dom.xml create mode 100644 debian/templates/normarc-retrieval-info-auth-grs1.xml create mode 100644 debian/templates/normarc-retrieval-info-bib-dom.xml create mode 100644 debian/templates/normarc-retrieval-info-bib-grs1.xml create mode 100644 debian/templates/unimarc-retrieval-info-auth-dom.xml create mode 100644 debian/templates/unimarc-retrieval-info-auth-grs1.xml create mode 100644 debian/templates/unimarc-retrieval-info-bib-dom.xml create mode 100644 debian/templates/unimarc-retrieval-info-bib-grs1.xml create mode 100644 etc/zebradb/etc/marc21.mar create mode 100644 etc/zebradb/etc/normarc.mar create mode 100644 etc/zebradb/etc/unimarc.mar diff --git a/Makefile.PL b/Makefile.PL index 6c6e186..f53869d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -508,7 +508,6 @@ my $pl_files = { if ($config{'INSTALL_ZEBRA'} eq "yes") { push @{ $pl_files->{'rewrite-config.PL'} }, ( 'blib/ZEBRA_CONF_DIR/etc/passwd', - 'blib/ZEBRA_CONF_DIR/etc/usmarc.mar', 'blib/ZEBRA_CONF_DIR/zebra-biblios.cfg', 'blib/ZEBRA_CONF_DIR/zebra-biblios-dom.cfg', 'blib/ZEBRA_CONF_DIR/zebra-authorities.cfg', diff --git a/debian/templates/koha-conf-site.xml.in b/debian/templates/koha-conf-site.xml.in index 0858059..1f1c521 100644 --- a/debian/templates/koha-conf-site.xml.in +++ b/debian/templates/koha-conf-site.xml.in @@ -29,47 +29,47 @@ /etc/koha/sites/__KOHASITE__/zebra-biblios.cfg /etc/koha/zebradb/pqf.properties - - + + - + - + - + - + - + - + @@ -104,42 +104,42 @@ /var/lib/koha/__KOHASITE__/authorities /etc/koha/sites/__KOHASITE__/zebra-authorities-dom.cfg /etc/koha/zebradb/pqf.properties - - - + + - + - + - + - + - + @@ -179,47 +179,47 @@ /etc/koha/sites/__KOHASITE__/zebra-biblios.cfg /etc/koha/zebradb/pqf.properties - - + + - + - + - + - + - + - + diff --git a/debian/templates/marc21-retrieval-info-auth-dom.xml b/debian/templates/marc21-retrieval-info-auth-dom.xml new file mode 100644 index 0000000..7e45f38 --- /dev/null +++ b/debian/templates/marc21-retrieval-info-auth-dom.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/debian/templates/marc21-retrieval-info-auth-grs1.xml b/debian/templates/marc21-retrieval-info-auth-grs1.xml new file mode 100644 index 0000000..a50260f --- /dev/null +++ b/debian/templates/marc21-retrieval-info-auth-grs1.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/debian/templates/marc21-retrieval-info-bib-dom.xml b/debian/templates/marc21-retrieval-info-bib-dom.xml new file mode 100644 index 0000000..7e45f38 --- /dev/null +++ b/debian/templates/marc21-retrieval-info-bib-dom.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/debian/templates/marc21-retrieval-info-bib-grs1.xml b/debian/templates/marc21-retrieval-info-bib-grs1.xml new file mode 100644 index 0000000..a50260f --- /dev/null +++ b/debian/templates/marc21-retrieval-info-bib-grs1.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/debian/templates/normarc-retrieval-info-auth-dom.xml b/debian/templates/normarc-retrieval-info-auth-dom.xml new file mode 100644 index 0000000..f723f9a --- /dev/null +++ b/debian/templates/normarc-retrieval-info-auth-dom.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/debian/templates/normarc-retrieval-info-auth-grs1.xml b/debian/templates/normarc-retrieval-info-auth-grs1.xml new file mode 100644 index 0000000..4b0742d --- /dev/null +++ b/debian/templates/normarc-retrieval-info-auth-grs1.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/debian/templates/normarc-retrieval-info-bib-dom.xml b/debian/templates/normarc-retrieval-info-bib-dom.xml new file mode 100644 index 0000000..f723f9a --- /dev/null +++ b/debian/templates/normarc-retrieval-info-bib-dom.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/debian/templates/normarc-retrieval-info-bib-grs1.xml b/debian/templates/normarc-retrieval-info-bib-grs1.xml new file mode 100644 index 0000000..4b0742d --- /dev/null +++ b/debian/templates/normarc-retrieval-info-bib-grs1.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/debian/templates/unimarc-retrieval-info-auth-dom.xml b/debian/templates/unimarc-retrieval-info-auth-dom.xml new file mode 100644 index 0000000..941f8e8 --- /dev/null +++ b/debian/templates/unimarc-retrieval-info-auth-dom.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/debian/templates/unimarc-retrieval-info-auth-grs1.xml b/debian/templates/unimarc-retrieval-info-auth-grs1.xml new file mode 100644 index 0000000..df703a8 --- /dev/null +++ b/debian/templates/unimarc-retrieval-info-auth-grs1.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/debian/templates/unimarc-retrieval-info-bib-dom.xml b/debian/templates/unimarc-retrieval-info-bib-dom.xml new file mode 100644 index 0000000..941f8e8 --- /dev/null +++ b/debian/templates/unimarc-retrieval-info-bib-dom.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + diff --git a/debian/templates/unimarc-retrieval-info-bib-grs1.xml b/debian/templates/unimarc-retrieval-info-bib-grs1.xml new file mode 100644 index 0000000..df703a8 --- /dev/null +++ b/debian/templates/unimarc-retrieval-info-bib-grs1.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/zebradb/etc/marc21.mar b/etc/zebradb/etc/marc21.mar new file mode 100644 index 0000000..2e1abe3 --- /dev/null +++ b/etc/zebradb/etc/marc21.mar @@ -0,0 +1,2 @@ +name marc21 +reference marc21 diff --git a/etc/zebradb/etc/normarc.mar b/etc/zebradb/etc/normarc.mar new file mode 100644 index 0000000..fe470c3 --- /dev/null +++ b/etc/zebradb/etc/normarc.mar @@ -0,0 +1,2 @@ +name normarc +reference normarc diff --git a/etc/zebradb/etc/unimarc.mar b/etc/zebradb/etc/unimarc.mar new file mode 100644 index 0000000..cf905d1 --- /dev/null +++ b/etc/zebradb/etc/unimarc.mar @@ -0,0 +1,2 @@ +name unimarc +reference unimarc diff --git a/etc/zebradb/etc/usmarc.mar b/etc/zebradb/etc/usmarc.mar index a977ae5..348c9a1 100644 --- a/etc/zebradb/etc/usmarc.mar +++ b/etc/zebradb/etc/usmarc.mar @@ -1,3 +1,2 @@ -# $Id: usmarc.mar,v 1.1 2002/10/22 12:51:09 adam Exp $ -name __ZEBRA_MARC_FORMAT__ -reference __ZEBRA_MARC_FORMAT__ +name usmarc +reference USmarc diff --git a/etc/zebradb/marc_defs/marc21/authorities/record.abs b/etc/zebradb/marc_defs/marc21/authorities/record.abs index f185887..0e0d451 100644 --- a/etc/zebradb/marc_defs/marc21/authorities/record.abs +++ b/etc/zebradb/marc_defs/marc21/authorities/record.abs @@ -14,7 +14,7 @@ attset gils.att esetname F @ esetname B @ -marc usmarc.mar +marc marc21.mar systag sysno rank xpath enable diff --git a/etc/zebradb/marc_defs/marc21/biblios/record.abs b/etc/zebradb/marc_defs/marc21/biblios/record.abs index 0f8360e..5ff08f4 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/record.abs +++ b/etc/zebradb/marc_defs/marc21/biblios/record.abs @@ -21,7 +21,7 @@ attset gils.att esetname F @ esetname B @ -marc usmarc.mar +marc marc21.mar systag sysno rank xpath enable # Some notes: diff --git a/etc/zebradb/marc_defs/normarc/biblios/record.abs b/etc/zebradb/marc_defs/normarc/biblios/record.abs index 97d5334..596ed3f 100644 --- a/etc/zebradb/marc_defs/normarc/biblios/record.abs +++ b/etc/zebradb/marc_defs/normarc/biblios/record.abs @@ -35,7 +35,7 @@ attset gils.att esetname F @ esetname B @ -marc usmarc.mar +marc normarc.mar systag sysno rank xpath enable # Some notes: diff --git a/etc/zebradb/marc_defs/unimarc/authorities/record.abs b/etc/zebradb/marc_defs/unimarc/authorities/record.abs index c6ed01f..5c992a8 100644 --- a/etc/zebradb/marc_defs/unimarc/authorities/record.abs +++ b/etc/zebradb/marc_defs/unimarc/authorities/record.abs @@ -6,7 +6,7 @@ attset gils.att esetname F @ esetname B @ -marc usmarc.mar +marc unimarc.mar systag sysno rank xpath enable diff --git a/etc/zebradb/marc_defs/unimarc/biblios/record.abs b/etc/zebradb/marc_defs/unimarc/biblios/record.abs index 44a5bbe..dd481b6 100644 --- a/etc/zebradb/marc_defs/unimarc/biblios/record.abs +++ b/etc/zebradb/marc_defs/unimarc/biblios/record.abs @@ -16,7 +16,7 @@ attset gils.att esetname F @ esetname B @ -marc usmarc.mar +marc unimarc.mar systag sysno rank xpath disable -- 1.7.9.5