From 64f8db0dccef6f48e692e09f564a00ef7a56cb5f Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 3 Sep 2015 13:09:07 +0200 Subject: [PATCH] Make pazpar2_play part of Deb/RPM PAZ-1031 --- debian/pazpar2.install | 2 + doc/Makefile.am | 4 +- doc/pazpar2.xml | 9 ++++- doc/pazpar2_play.xml | 102 ++++++++++++++++++++++++++++++++++++++++++++++++ pazpar2.spec | 2 + src/Makefile.am | 4 +- 6 files changed, 118 insertions(+), 5 deletions(-) create mode 100644 doc/pazpar2_play.xml diff --git a/debian/pazpar2.install b/debian/pazpar2.install index 8fb8b93..c49de2c 100644 --- a/debian/pazpar2.install +++ b/debian/pazpar2.install @@ -1 +1,3 @@ debian/tmp/usr/sbin/pazpar2 +debian/tmp/usr/bin/pazpar2_play + diff --git a/doc/Makefile.am b/doc/Makefile.am index 75ea688..a0dcd14 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -7,11 +7,11 @@ XMLFILES = book.xml ajaxdev.xml manref.xml gpl-2.0.xml local.ent MAINXML = $(srcdir)/book.xml -XMLMAN = pazpar2.xml pazpar2_protocol.xml pazpar2_conf.xml +XMLMAN = pazpar2.xml pazpar2_protocol.xml pazpar2_conf.xml pazpar2_play.xml SUPPORTFILES = entities.ent -MANFILES = pazpar2.8 pazpar2_protocol.7 pazpar2_conf.5 +MANFILES = pazpar2.8 pazpar2_protocol.7 pazpar2_conf.5 pazpar2_play.1 HTMLFILES = index.html diff --git a/doc/pazpar2.xml b/doc/pazpar2.xml index f9880c8..6583a9f 100644 --- a/doc/pazpar2.xml +++ b/doc/pazpar2.xml @@ -148,7 +148,7 @@ (-), will make Pazpar2 use predictable sessions only (no recording). This is necessary when playing HTTP communication against pazpar2 - with pazpar2_play. + with the pazpar2 program. Refer to . @@ -311,6 +311,13 @@ 7 + + Pazpar2 player: + + pazpar2_play + 1 + + diff --git a/doc/pazpar2_play.xml b/doc/pazpar2_play.xml new file mode 100644 index 0000000..6b061fa --- /dev/null +++ b/doc/pazpar2_play.xml @@ -0,0 +1,102 @@ + + %local; + + %entities; + + %idcommon; +]> + + + Pazpar2_Play + &version; + Index Data + + + + Pazpar2_Play + 1 + User Commands + + + pazpar2_play + Play recorded HTTP log against pazpar2 + + + + pazpar2_play + + file + server-addr + + + + DESCRIPTION + + pazpar2_play is a utility that plays recorded + HTTP activity against pazpar2. Pazpar2 may record activity to a file + with option -R. This utilility allow you to play the activity again + against pazpar2. Pazpar2 must use predictable sessions in order for this + to work. This means that either Pazpar2 should be executed with option -R. + + + + OPTIONS + + + + + + Sets log level (YAZ log level system). + + + + + + + EXAMPLES + + Typical usage. First step is to enable recording in pazpar2. + Something like: + + pazpar2 -f config.xml -R /tmp/recording.log + + For RPM version of Pazpar2, add/modify + /etc/sysconfig/pazpar2 and modify OPTIONS. + For Debian version of Pazpar2 add/modify + /etc/defaults/pazpar2 and modify OPTIONS. + + + At some point we want to run recording.. Perhaps against another + Pazpar2 instance for analysis. We start Pazpar2 with -R- to ensure + that sessions are numbered in the same way initial recording. + + pazpar2 -f config.xml -R - + + We can now run the player against it: + + pazpar2_play /tmp/recording.log localhost:9004 + + + + + SEE ALSO + + Pazpar2 configuration: + + pazpar2 + 8 + + + + + + + diff --git a/pazpar2.spec b/pazpar2.spec index 7a6dc29..08ad5c6 100644 --- a/pazpar2.spec +++ b/pazpar2.spec @@ -112,6 +112,7 @@ rm -fr ${RPM_BUILD_ROOT} %defattr(-,root,root) %doc README LICENSE NEWS %{_sbindir}/pazpar2 +%{_bindir}/pazpar2_play %dir %{_sysconfdir}/pazpar2 %dir %{_sysconfdir}/pazpar2/settings %dir %{_sysconfdir}/pazpar2/settings/mkc @@ -123,6 +124,7 @@ rm -fr ${RPM_BUILD_ROOT} %config %{_sysconfdir}/pazpar2/services-available/*.xml %config %{_sysconfdir}/rc.d/init.d/pazpar2 %config(noreplace) /etc/logrotate.d/pazpar2 +%{_mandir}/man1/pazpar2* %{_mandir}/man5/pazpar2* %{_mandir}/man7/pazpar2* %{_mandir}/man8/pazpar2* diff --git a/src/Makefile.am b/src/Makefile.am index d537ba9..2da37d0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ # This file is part of Pazpar2. sbin_PROGRAMS = pazpar2 -noinst_PROGRAMS = pazpar2_play +bin_PROGRAMS = pazpar2_play check_PROGRAMS = \ test_sel_thread \ @@ -14,7 +14,7 @@ noinst_LIBRARIES = libpazpar2.a CONFIG_CLEAN_FILES=*.log AM_CFLAGS = $(YAZINC) - + libpazpar2_a_SOURCES = \ charsets.c charsets.h \ client.c client.h \ -- 1.7.10.4