Koha Test Wiki MW Canasta on Koha Portainer
Test major Koha Wiki changes or bug fixes here without fear of breaking the production wiki.
For the current Koha Wiki, visit https://wiki.koha-community.org .Developing Zebra
Jump to navigation
Jump to search
WARNING: This page is under active development! Use at your own risk!
Develop Zebra using Docker
Set up development environment
- Launch a Debian/Ubuntu Docker container (I used ubuntu:latest which was still set to Ubuntu 18.04 at the time of my work)
- apt-get update
- apt-get install wget vim
- vi /etc/apt/sources.list.d/indexdata.list
deb https://ftp.indexdata.com/ubuntu bionic main
deb-src https://ftp.indexdata.com/ubuntu bionic main - wget -q -O- https://ftp.indexdata.com/debian/indexdata.asc | apt-key add -
- apt-get update
- apt-get install git build-essential autoconf automake libyaz5-dev libexpat1-dev tcl-dev libbz2-dev libtool xsltproc inkscape
- git clone https://github.com/indexdata/idzebra.git
- sh buildconf.sh
- ./configure
- make
Run Zebra
- cd examples/marcxml
- ../../index/zebraidx init
- ../../index/zebraidx update collection-*.xml
- ../../index/zebrasrv
Test Zebra
- Edit the C code (e.g. index/retrieve.c)
- cd to root directory of Git clone
- make
- Re-run zebrasrv
Run yaz-client
- apt-get install yaz
- yaz-client localhost:9999
- form xml
- find @attr 1=_ALLRECORDS @attr 2=103 ""
Notes/Tips
- I noticed that "make install" didn't work when I tried it (https://github.com/indexdata/idzebra/issues/36), so I'd recommend statically compiling using "./configure --disable-shared". This is also useful if you want to test your customized Zebra against a Zebra database that you've created using Koha. You can just statically compile and copy the binary over to your target destination and run it using your koha-conf.xml like normal.
- While I haven't tried building the RPM or DEB packages, that would probably be the best way to distribute a customized Zebra. That said, at this point, I wouldn't recommend forking and using a customized Zebra in production. I just created this wiki for people to hack on Zebra, so that they can send pull requests to Indexdata or so that they can submit more detailed issue reports to Indexdata.
- Notice that you've compiled Zebra using libyaz5-dev. Some of the core server functionality of Zebra comes from libyaz5, so you may find you need to clone yaz (https://github.com/indexdata/yaz) too so that you can better understand index/zebrasrv.c