Make pazpar2_play part of Deb/RPM PAZ-1031
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 3 Sep 2015 11:09:07 +0000 (13:09 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 3 Sep 2015 11:09:07 +0000 (13:09 +0200)
debian/pazpar2.install
doc/Makefile.am
doc/pazpar2.xml
doc/pazpar2_play.xml [new file with mode: 0644]
pazpar2.spec
src/Makefile.am

index 8fb8b93..c49de2c 100644 (file)
@@ -1 +1,3 @@
 debian/tmp/usr/sbin/pazpar2
+debian/tmp/usr/bin/pazpar2_play
+
index 75ea688..a0dcd14 100644 (file)
@@ -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
 
index f9880c8..6583a9f 100644 (file)
       (<literal>-</literal>), 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 <xref linkend="pazpar2_play"/>.
      </para>
     </listitem>
    </varlistentry>
     <manvolnum>7</manvolnum>
    </citerefentry>
   </para>
+  <para>
+   Pazpar2 player:
+   <citerefentry>
+    <refentrytitle>pazpar2_play</refentrytitle>
+    <manvolnum>1</manvolnum>
+   </citerefentry>
+  </para>
  </refsect1>
 
 </refentry>
diff --git a/doc/pazpar2_play.xml b/doc/pazpar2_play.xml
new file mode 100644 (file)
index 0000000..6b061fa
--- /dev/null
@@ -0,0 +1,102 @@
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
+[
+     <!ENTITY % local SYSTEM "local.ent">
+     %local;
+     <!ENTITY % entities SYSTEM "entities.ent">
+     %entities;
+     <!ENTITY % idcommon SYSTEM "common/common.ent">
+     %idcommon;
+]>
+<refentry id="pazpar2_play">
+ <refentryinfo>
+  <productname>Pazpar2_Play</productname>
+  <productnumber>&version;</productnumber>
+  <info><orgname>Index Data</orgname></info>
+ </refentryinfo>
+
+ <refmeta>
+  <refentrytitle>Pazpar2_Play</refentrytitle>
+  <manvolnum>1</manvolnum>
+  <refmiscinfo class="manual">User Commands</refmiscinfo>
+ </refmeta>
+ <refnamediv>
+  <refname>pazpar2_play</refname>
+  <refpurpose>Play recorded HTTP log against pazpar2</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+  <cmdsynopsis>
+   <command>pazpar2_play</command>
+   <arg choice="opt"><option>-v <replaceable>level</replaceable></option></arg>
+   <arg choice="opt">file</arg>
+   <arg choice="opt">server-addr</arg>
+  </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+  <title>DESCRIPTION</title>
+  <para>
+   <command>pazpar2_play</command> 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.
+  </para>
+ </refsect1>
+ <refsect1>
+  <title>OPTIONS</title>
+  <variablelist>
+   <varlistentry>
+    <term><option>-v <replaceable>level</replaceable></option></term>
+    <listitem>
+     <para>
+      Sets log level (YAZ log level system).
+     </para>
+    </listitem>
+   </varlistentry>
+  </variablelist>
+ </refsect1>
+ <refsect1>
+  <title>EXAMPLES</title>
+  <para>
+   Typical usage. First step is to enable recording in pazpar2.
+   Something like:
+   <screen>
+    pazpar2 -f config.xml -R /tmp/recording.log
+   </screen>
+   For RPM version of Pazpar2, add/modify
+   <filename>/etc/sysconfig/pazpar2</filename> and modify OPTIONS.
+   For Debian version of Pazpar2 add/modify
+   <filename>/etc/defaults/pazpar2</filename> and modify OPTIONS.
+  </para>
+  <para>
+   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.
+   <screen>
+    pazpar2 -f config.xml -R -
+   </screen>
+   We can now run the player against it:
+   <screen>
+    pazpar2_play /tmp/recording.log localhost:9004
+   </screen>
+  </para>
+ </refsect1>
+ <refsect1>
+  <title>SEE ALSO</title>
+  <para>
+   Pazpar2 configuration:
+   <citerefentry>
+    <refentrytitle>pazpar2</refentrytitle>
+    <manvolnum>8</manvolnum>
+   </citerefentry>
+  </para>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: nxml
+nxml-child-indent: 1
+End:
+-->
index 7a6dc29..08ad5c6 100644 (file)
@@ -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*
index d537ba9..2da37d0 100644 (file)
@@ -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 \