Hello community,
here is the log from the commit of package booth for openSUSE:Factory checked in at 2014-03-04 13:20:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/booth (Old)
and /work/SRC/openSUSE:Factory/.booth.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "booth"
Changes:
--------
--- /work/SRC/openSUSE:Factory/booth/booth.changes 2014-02-18 14:43:53.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.booth.new/booth.changes 2014-03-04 13:20:36.000000000 +0100
@@ -1,0 +2,11 @@
+Mon Feb 24 13:32:21 CET 2014 - philipp.marek@linbit.com
+
+- Systemd integration
+- Atomic ticket writes (grant/revoke with attributes)
+ Automatic fallback for older 'crm_ticket' binaries
+- Autoconf/Configure check for moved log_cib_diff() function
+ Make package build again with newer Pacemaker libraries.
+- Small fixes, cleanups, and enhancements for the unit tests.
+- Version 0.1.6
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ booth.spec ++++++
--- /var/tmp/diff_new_pack.R9ao1q/_old 2014-03-04 13:20:36.000000000 +0100
+++ /var/tmp/diff_new_pack.R9ao1q/_new 2014-03-04 13:20:36.000000000 +0100
@@ -38,7 +38,7 @@
Summary: The Booth Cluster Ticket Manager
License: GPL-2.0+
Group: Productivity/Clustering/HA
-Version: 0.1.5
+Version: 0.1.6
Release: 0
Source: booth.tar.bz2
Source1: %name-rpmlintrc
@@ -88,6 +88,10 @@
gzip < docs/boothd.8 > %{buildroot}/%{_mandir}/man8/booth.8.gz
ln %{buildroot}/%{_mandir}/man8/booth.8.gz %{buildroot}/%{_mandir}/man8/boothd.8.gz
+# systemd
+mkdir -p %{buildroot}/usr/lib/systemd/system/
+cp -a conf/booth@.service %{buildroot}/usr/lib/systemd/system/booth@.service
+
#install test-parts
mkdir -p %{buildroot}/%{test_path}
@@ -129,6 +133,9 @@
%{_initddir}/booth-arbitrator
/usr/lib/ocf/resource.d/pacemaker/booth-site
%config %{_sysconfdir}/booth/booth.conf.example
+
+/usr/lib/systemd/system/booth@.service
+
%doc README COPYING
%package test
++++++ _service ++++++
--- /var/tmp/diff_new_pack.R9ao1q/_old 2014-03-04 13:20:36.000000000 +0100
+++ /var/tmp/diff_new_pack.R9ao1q/_new 2014-03-04 13:20:36.000000000 +0100
@@ -1,6 +1,6 @@
<services>
<service name="tar_scm" mode="disabled">
- <param name="url">git://github.com/jjzhang/booth.git</param>
+ <param name="url">git://github.com/ClusterLabs/booth.git</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="version"></param>
++++++ booth.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/conf/booth@.service new/booth/conf/booth@.service
--- old/booth/conf/booth@.service 1970-01-01 01:00:00.000000000 +0100
+++ new/booth/conf/booth@.service 2014-02-24 13:41:07.000000000 +0100
@@ -0,0 +1,17 @@
+# This file is part of Booth.
+
+[Unit]
+Description=Booth - Ticket Manager for Pacemaker Clusters
+Documentation=man:boothd(8)
+After=network-online.target
+ConditionFileExists=/etc/booth/%i.conf
+
+[Install]
+Alias=boothd
+WantedBy=multi-user.target
+
+[Service]
+Type=simple
+Conflicts=pacemaker.service
+ExecStart=/usr/sbin/boothd daemon -S -c %i
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/configure new/booth/configure
--- old/booth/configure 2014-02-17 12:46:01.000000000 +0100
+++ new/booth/configure 2014-02-24 13:15:11.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for booth 0.1.4.
+# Generated by GNU Autoconf 2.69 for booth 0.1.5.
#
# Report bugs to .
#
@@ -580,8 +580,8 @@
# Identity of this package.
PACKAGE_NAME='booth'
PACKAGE_TARNAME='booth'
-PACKAGE_VERSION='0.1.4'
-PACKAGE_STRING='booth 0.1.4'
+PACKAGE_VERSION='0.1.5'
+PACKAGE_STRING='booth 0.1.5'
PACKAGE_BUGREPORT='pacemaker@oss.clusterlabs.org'
PACKAGE_URL=''
@@ -626,6 +626,8 @@
am__EXEEXT_TRUE
LTLIBOBJS
BOOTHSYSCONFDIR
+HAVE_XML_LOG_PATCHSET
+HAVE_LOG_CIB_DIFF
LINT_FLAGS
BUILD_HTML_DOCS_FALSE
BUILD_HTML_DOCS_TRUE
@@ -1316,7 +1318,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures booth 0.1.4 to adapt to many kinds of systems.
+\`configure' configures booth 0.1.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1386,7 +1388,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of booth 0.1.4:";;
+ short | recursive ) echo "Configuration of booth 0.1.5:";;
esac
cat <<\_ACEOF
@@ -1495,7 +1497,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-booth configure 0.1.4
+booth configure 0.1.5
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2094,7 +2096,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by booth $as_me 0.1.4, which was
+It was created by booth $as_me 0.1.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2958,7 +2960,7 @@
# Define the identity of the package.
PACKAGE='booth'
- VERSION='0.1.4'
+ VERSION='0.1.5'
cat >>confdefs.h <<_ACEOF
@@ -7097,7 +7099,182 @@
WERROR_CFLAGS=""
fi
+RESMON_CFLAGS=""
if test "x${enable_resource_monitor}" = xyes; then
+ RESMON_CFLAGS="-I$oldincludedir/pacemaker/"
+ CPPFLAGS="$ENV_CPPFLAGS $ANSI_CPPFLAGS $OS_CPPFLAGS $GLIB_CFLAGS $RESMON_CFLAGS"
+ for ac_header in libxml/tree.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "libxml/tree.h" "ac_cv_header_libxml_tree_h" "$ac_includes_default"
+if test "x$ac_cv_header_libxml_tree_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBXML_TREE_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_header in crm/cib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "crm/cib.h" "ac_cv_header_crm_cib_h" "$ac_includes_default"
+if test "x$ac_cv_header_crm_cib_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_CRM_CIB_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_header in crm/cib/util.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "crm/cib/util.h" "ac_cv_header_crm_cib_util_h" "
+#include
+#include
+
+"
+if test "x$ac_cv_header_crm_cib_util_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_CRM_CIB_UTIL_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_header in crm/common/xml.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "crm/common/xml.h" "ac_cv_header_crm_common_xml_h" "
+#include
+#include
+
+"
+if test "x$ac_cv_header_crm_common_xml_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_CRM_COMMON_XML_H 1
+_ACEOF
+
+fi
+
+done
+
+ as_ac_Lib=`$as_echo "ac_cv_lib_crmcommon -lcrmcluster -lpe_status -lcib -lglib-2.0 -lqb -lxml2''_xml_log_patchset" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for xml_log_patchset in -lcrmcommon -lcrmcluster -lpe_status -lcib -lglib-2.0 -lqb -lxml2" >&5
+$as_echo_n "checking for xml_log_patchset in -lcrmcommon -lcrmcluster -lpe_status -lcib -lglib-2.0 -lqb -lxml2... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrmcommon -lcrmcluster -lpe_status -lcib -lglib-2.0 -lqb -lxml2 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char xml_log_patchset ();
+int
+main ()
+{
+return xml_log_patchset ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_ac_Lib=yes"
+else
+ eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCRMCOMMON__LCRMCLUSTER__LPE_STATUS__LCIB__LGLIB_2_0__LQB__LXML2 1
+_ACEOF
+
+ LIBS="-lcrmcommon -lcrmcluster -lpe_status -lcib -lglib-2.0 -lqb -lxml2 $LIBS"
+
+fi
+
+ as_ac_Lib=`$as_echo "ac_cv_lib_crmcommon -lcrmcluster -lpe_status -lcib -lglib-2.0 -lqb -lxml2''_log_cib_diff" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for log_cib_diff in -lcrmcommon -lcrmcluster -lpe_status -lcib -lglib-2.0 -lqb -lxml2" >&5
+$as_echo_n "checking for log_cib_diff in -lcrmcommon -lcrmcluster -lpe_status -lcib -lglib-2.0 -lqb -lxml2... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrmcommon -lcrmcluster -lpe_status -lcib -lglib-2.0 -lqb -lxml2 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char log_cib_diff ();
+int
+main ()
+{
+return log_cib_diff ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_ac_Lib=yes"
+else
+ eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBCRMCOMMON__LCRMCLUSTER__LPE_STATUS__LCIB__LGLIB_2_0__LQB__LXML2 1
+_ACEOF
+
+ LIBS="-lcrmcommon -lcrmcluster -lpe_status -lcib -lglib-2.0 -lqb -lxml2 $LIBS"
+
+fi
+
+ for ac_func in log_cib_diff
+do :
+ ac_fn_c_check_func "$LINENO" "log_cib_diff" "ac_cv_func_log_cib_diff"
+if test "x$ac_cv_func_log_cib_diff" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LOG_CIB_DIFF 1
+_ACEOF
+
+fi
+done
+
+ for ac_func in xml_log_patchset
+do :
+ ac_fn_c_check_func "$LINENO" "xml_log_patchset" "ac_cv_func_xml_log_patchset"
+if test "x$ac_cv_func_xml_log_patchset" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_XML_LOG_PATCHSET 1
+_ACEOF
+
+fi
+done
+
PACKAGE_FEATURES="$PACKAGE_FEATURES resource-monitor"
WITH_LIST="$WITH_LIST --with resource-monitor"
SUPPORT_RESOURCE_MONITOR=1
@@ -7124,7 +7301,7 @@
# final build of *FLAGS
CFLAGS="$ENV_CFLAGS $OPT_CFLAGS $GDB_FLAGS $OS_CFLAGS \
$COVERAGE_CFLAGS $EXTRA_WARNINGS $WERROR_CFLAGS $NSS_CFLAGS"
-CPPFLAGS="$ENV_CPPFLAGS $ANSI_CPPFLAGS $OS_CPPFLAGS"
+CPPFLAGS="$ENV_CPPFLAGS $ANSI_CPPFLAGS $OS_CPPFLAGS $GLIB_CFLAGS $RESMON_CFLAGS"
LDFLAGS="$ENV_LDFLAGS $COVERAGE_LDFLAGS $OS_LDFLAGS"
# substitute what we need:
@@ -7184,6 +7361,8 @@
BOOTHSYSCONFDIR=${sysconfdir}/booth
+
+
cat >>confdefs.h <<_ACEOF
#define BOOTHSYSCONFDIR "$(eval echo ${BOOTHSYSCONFDIR})"
_ACEOF
@@ -7745,7 +7924,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by booth $as_me 0.1.4, which was
+This file was extended by booth $as_me 0.1.5, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7815,7 +7994,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-booth config.status 0.1.4
+booth config.status 0.1.5
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/configure.ac new/booth/configure.ac
--- old/booth/configure.ac 2014-02-17 13:11:17.000000000 +0100
+++ new/booth/configure.ac 2014-02-24 13:41:07.000000000 +0100
@@ -4,7 +4,7 @@
# bootstrap / init
AC_PREREQ([2.61])
-AC_INIT([booth], [0.1.5], [pacemaker@oss.clusterlabs.org])
+AC_INIT([booth], [0.1.6], [pacemaker@oss.clusterlabs.org])
AM_INIT_AUTOMAKE([-Wno-portability])
@@ -347,7 +347,26 @@
WERROR_CFLAGS=""
fi
+RESMON_CFLAGS=""
if test "x${enable_resource_monitor}" = xyes; then
+ RESMON_CFLAGS="-I$oldincludedir/pacemaker/"
+ CPPFLAGS="$ENV_CPPFLAGS $ANSI_CPPFLAGS $OS_CPPFLAGS $GLIB_CFLAGS $RESMON_CFLAGS"
+ AC_CHECK_HEADERS(libxml/tree.h)
+ AC_CHECK_HEADERS(crm/cib.h)
+ AC_CHECK_HEADERS([crm/cib/util.h], [], [],
+ [
+#include
+#include
+ ])
+ AC_CHECK_HEADERS([crm/common/xml.h], [], [],
+ [
+#include
+#include
+ ])
+ AC_CHECK_LIB([crmcommon -lcrmcluster -lpe_status -lcib -lglib-2.0 -lqb -lxml2], [xml_log_patchset])
+ AC_CHECK_LIB([crmcommon -lcrmcluster -lpe_status -lcib -lglib-2.0 -lqb -lxml2], [log_cib_diff])
+ AC_CHECK_FUNCS(log_cib_diff)
+ AC_CHECK_FUNCS(xml_log_patchset)
PACKAGE_FEATURES="$PACKAGE_FEATURES resource-monitor"
WITH_LIST="$WITH_LIST --with resource-monitor"
SUPPORT_RESOURCE_MONITOR=1
@@ -367,7 +386,7 @@
# final build of *FLAGS
CFLAGS="$ENV_CFLAGS $OPT_CFLAGS $GDB_FLAGS $OS_CFLAGS \
$COVERAGE_CFLAGS $EXTRA_WARNINGS $WERROR_CFLAGS $NSS_CFLAGS"
-CPPFLAGS="$ENV_CPPFLAGS $ANSI_CPPFLAGS $OS_CPPFLAGS"
+CPPFLAGS="$ENV_CPPFLAGS $ANSI_CPPFLAGS $OS_CPPFLAGS $GLIB_CFLAGS $RESMON_CFLAGS"
LDFLAGS="$ENV_LDFLAGS $COVERAGE_LDFLAGS $OS_LDFLAGS"
# substitute what we need:
@@ -392,6 +411,8 @@
AC_DEFINE_UNQUOTED([LOCALSTATEDIR], "$(eval echo ${localstatedir})", [localstate directory])
BOOTHSYSCONFDIR=${sysconfdir}/booth
+AC_SUBST([HAVE_LOG_CIB_DIFF])
+AC_SUBST([HAVE_XML_LOG_PATCHSET])
AC_SUBST([BOOTHSYSCONFDIR])
AC_DEFINE_UNQUOTED([BOOTHSYSCONFDIR], "$(eval echo ${BOOTHSYSCONFDIR})", [booth config directory])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/docs/boothd.8 new/booth/docs/boothd.8
--- old/booth/docs/boothd.8 2014-01-24 15:59:55.000000000 +0100
+++ new/booth/docs/boothd.8 2014-02-21 12:53:32.000000000 +0100
@@ -2,12 +2,12 @@
.\" Title: boothd
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 http://docbook.sf.net/
-.\" Date: 01/24/2014
+.\" Date: 02/21/2014
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "BOOTHD" "8" "01/24/2014" "\ \&" "\ \&"
+.TH "BOOTHD" "8" "02/21/2014" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -104,6 +104,14 @@
.RS 4
Report version information\&.
.RE
+.PP
+\fB\-S\fR
+.RS 4
+\fIsystemd\fR
+mode: don\(cqt fork\&. This is like
+\fI\-D\fR
+but without the debug output\&.
+.RE
.SH "COMMANDS"
.sp
Whether the binary is called as \fIboothd\fR or \fIbooth\fR doesn\(cqt matter; the first argument determines the mode of operation\&.
@@ -306,6 +314,22 @@
\fIstatus\fR
command\&.
.RE
+.SH "SYSTEMD INTEGRATION"
+.sp
+The Booth sources (and, very likely, packages too) include a \fIsystemd\fR unit file for \fIboothd\fR\&.
+.sp
+So don\(cqt forget to install \fIboothd\fR into \fIsystemd\fR after configuration!
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+# systemctl enable booth@{configurationname}\&.service
+# systemctl start booth@{configurationname}\&.service
+.fi
+.if n \{\
+.RE
+.\}
.SH "EXIT STATUS"
.PP
\fB0\fR
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/docs/boothd.8.html new/booth/docs/boothd.8.html
--- old/booth/docs/boothd.8.html 2014-02-17 13:12:37.000000000 +0100
+++ new/booth/docs/boothd.8.html 2014-02-24 13:41:17.000000000 +0100
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>boothd</title><link rel="stylesheet" type="text/css" href="docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /></head><body><div xml:lang="en" class="refentry" lang="en"><a id="idm139789799956336"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>boothd — The Booth Cluster Ticket Manager.</p></div><div class="refsynopsisdiv"><a id="_synopsis"></a><h2>Synopsis</h2><p><span class="strong"><strong>boothd</strong></span> <span class="emphasis"><em>daemon</em></span> [<span class="emphasis"><em>-D</em></span>] [-c <span class="emphasis"><em>config</em></span>]</p><p><span class="strong"><strong>booth</strong></span> [<span class="emphasis"><em>client</em></span>] {<span class="emphasis"><em>list</em></span>} [-S <span class="emphasis"><em>site</em></span>] [<span class="emphasis"><em>-D</em></span>] [-c <span class="emphasis"><em>config</em></span>]</p><p><span class="strong"><strong>booth</strong></span> [<span class="emphasis"><em>client</em></span>] {<span class="emphasis"><em>grant</em></span>|<span class="emphasis"><em>revoke</em></span>} [-S <span class="emphasis"><em>site</em></span>] [<span class="emphasis"><em>-D</em></span>] [-t] <span class="emphasis"><em>ticket</em></span> [-c <span class="emphasis"><em>config</em></span>]</p><p><span class="strong"><strong>booth</strong></span> <span class="emphasis"><em>status</em></span> [<span class="emphasis"><em>-D</em></span>] [-c <span class="emphasis"><em>config</em></span>]</p></div><div class="refsect1"><a id="_description"></a><h2>DESCRIPTION</h2><p>Booth manages tickets which authorizes one of the cluster sites located in
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>boothd</title><link rel="stylesheet" type="text/css" href="docbook-xsl.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /></head><body><div xml:lang="en" class="refentry" lang="en"><a id="idm140263446345392"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>boothd — The Booth Cluster Ticket Manager.</p></div><div class="refsynopsisdiv"><a id="_synopsis"></a><h2>Synopsis</h2><p><span class="strong"><strong>boothd</strong></span> <span class="emphasis"><em>daemon</em></span> [<span class="emphasis"><em>-D</em></span>] [-c <span class="emphasis"><em>config</em></span>]</p><p><span class="strong"><strong>booth</strong></span> [<span class="emphasis"><em>client</em></span>] {<span class="emphasis"><em>list</em></span>} [-S <span class="emphasis"><em>site</em></span>] [<span class="emphasis"><em>-D</em></span>] [-c <span class="emphasis"><em>config</em></span>]</p><p><span class="strong"><strong>booth</strong></span> [<span class="emphasis"><em>client</em></span>] {<span class="emphasis"><em>grant</em></span>|<span class="emphasis"><em>revoke</em></span>} [-S <span class="emphasis"><em>site</em></span>] [<span class="emphasis"><em>-D</em></span>] [-t] <span class="emphasis"><em>ticket</em></span> [-c <span class="emphasis"><em>config</em></span>]</p><p><span class="strong"><strong>booth</strong></span> <span class="emphasis"><em>status</em></span> [<span class="emphasis"><em>-D</em></span>] [-c <span class="emphasis"><em>config</em></span>]</p></div><div class="refsect1"><a id="_description"></a><h2>DESCRIPTION</h2><p>Booth manages tickets which authorizes one of the cluster sites located in
geographically dispersed distances to run certain resources. It is designed to
be an add-on to Pacemaker, which extends Pacemaker to support geographically
distributed clustering.</p><p>It is based on the PAXOS protocol, see eg.
@@ -39,6 +39,10 @@
<span class="strong"><strong>-v</strong></span>, <span class="strong"><strong>--version</strong></span>
</span></dt><dd>
Report version information.
+</dd><dt><span class="term">
+<span class="strong"><strong>-S</strong></span>
+</span></dt><dd>
+ <span class="emphasis"><em>systemd</em></span> mode: don’t fork. This is like <span class="emphasis"><em>-D</em></span> but without the debug output.
</dd></dl></div></div><div class="refsect1"><a id="_commands"></a><h2>COMMANDS</h2><p>Whether the binary is called as <span class="emphasis"><em>boothd</em></span> or <span class="emphasis"><em>booth</em></span> doesn’t matter; the first
argument determines the mode of operation.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term">
<span class="strong"><strong><span class="emphasis"><em>daemon</em></span></strong></span>
@@ -153,7 +157,9 @@
<span class="strong"><strong><span class="emphasis"><em>/var/run/booth/</em></span></strong></span>
</span></dt><dd>
Directory that holds PID/lock files. See also the <span class="emphasis"><em>status</em></span> command.
-</dd></dl></div></div><div class="refsect1"><a id="_exit_status"></a><h2>EXIT STATUS</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">
+</dd></dl></div></div><div class="refsect1"><a id="_systemd_integration"></a><h2>SYSTEMD INTEGRATION</h2><p>The Booth sources (and, very likely, packages too) include a <span class="emphasis"><em>systemd</em></span> unit
+file for <span class="emphasis"><em>boothd</em></span>.</p><p>So don’t forget to install <span class="emphasis"><em>boothd</em></span> into <span class="emphasis"><em>systemd</em></span> after configuration!</p><pre class="screen"># systemctl enable booth@{configurationname}.service
+# systemctl start booth@{configurationname}.service</pre></div><div class="refsect1"><a id="_exit_status"></a><h2>EXIT STATUS</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">
<span class="strong"><strong>0</strong></span>
</span></dt><dd>
Success. For the <span class="emphasis"><em>status</em></span> command: Daemon running.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/docs/boothd.8.txt new/booth/docs/boothd.8.txt
--- old/booth/docs/boothd.8.txt 2014-02-17 13:11:17.000000000 +0100
+++ new/booth/docs/boothd.8.txt 2014-02-24 13:41:07.000000000 +0100
@@ -76,6 +76,9 @@
*-v*, *--version*::
Report version information.
+*-S*::
+ 'systemd' mode: don't fork. This is like '-D' but without the debug output.
+
COMMANDS
@@ -259,6 +262,19 @@
Directory that holds PID/lock files. See also the 'status' command.
+SYSTEMD INTEGRATION
+-------------------
+
+The Booth sources (and, very likely, packages too) include a 'systemd' unit
+file for 'boothd'.
+
+So don't forget to install 'boothd' into 'systemd' after configuration!
+
+-----------
+# systemctl enable booth@{configurationname}.service
+# systemctl start booth@{configurationname}.service
+-----------
+
EXIT STATUS
-----------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/docs/boothd.8.xml new/booth/docs/boothd.8.xml
--- old/booth/docs/boothd.8.xml 2014-02-17 13:12:39.000000000 +0100
+++ new/booth/docs/boothd.8.xml 2014-02-24 13:41:18.000000000 +0100
@@ -112,6 +112,16 @@
</simpara>
</listitem>
</varlistentry>
+<varlistentry>
+<term>
+<emphasis role="strong">-S</emphasis>
+</term>
+<listitem>
+<simpara>
+ <emphasis>systemd</emphasis> mode: don’t fork. This is like <emphasis>-D</emphasis> but without the debug output.
+</simpara>
+</listitem>
+</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="_commands">
@@ -364,6 +374,14 @@
</varlistentry>
</variablelist>
</refsect1>
+<refsect1 id="_systemd_integration">
+<title>SYSTEMD INTEGRATION</title>
+<simpara>The Booth sources (and, very likely, packages too) include a <emphasis>systemd</emphasis> unit
+file for <emphasis>boothd</emphasis>.</simpara>
+<simpara>So don’t forget to install <emphasis>boothd</emphasis> into <emphasis>systemd</emphasis> after configuration!</simpara>
+<screen># systemctl enable booth@{configurationname}.service
+# systemctl start booth@{configurationname}.service</screen>
+</refsect1>
<refsect1 id="_exit_status">
<title>EXIT STATUS</title>
<variablelist>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/script/unit-test.py new/booth/script/unit-test.py
--- old/booth/script/unit-test.py 2014-02-17 13:11:17.000000000 +0100
+++ new/booth/script/unit-test.py 2014-02-24 13:41:07.000000000 +0100
@@ -180,6 +180,7 @@
# if not, we terminate it ourselves.
if self.gdb:
self.gdb.close( force=True );
+ self.drain_booth_log()
if self.booth:
self.booth.close( force=self.booth.isalive() )
@@ -225,7 +226,14 @@
self.gdb = self.start_a_process("gdb",
args=["-quiet",
"-p", str(self.booth.pid),
- "-nx", "-nh", # don't use .gdbinit
+ # Don't use .gdbinit
+ "-nx", "-nh",
+ # Run until the defined point.
+ # This is necessary so that ticket state setting doesn't
+ # happen _before_ the call to pcmk_load_ticket()
+ # (which would overwrite our data)
+ "-ex", "break ticket_cron",
+ "-ex", "continue",
])
logging.info("started GDB with PID %d" % self.gdb.pid)
self.gdb.expect("(gdb)")
@@ -234,18 +242,18 @@
self.gdb.sendline("set verbose off\n") ## sadly to late for the initial "symbol not found" messages
self.gdb.sendline("set prompt " + self.prompt + "\\n\n");
self.sync(2000)
- #os.system("strace -o /tmp/sfdgs -f -tt -s 2000 -p %d &" % self.gdb.pid)
+ # Only stop for this recipient, so that broadcasts are not seen multiple times
+ self.send_cmd("break booth_udp_send if to == &(booth_conf->site[1])")
+ self.send_cmd("break recvfrom")
+ # ticket_cron is still a breakpoint
+
+ # Now we're set up.
self.this_site_id = self.query_value("local->site_id")
self.this_port = int(self.query_value("booth_conf->port"))
# do a self-test
assert(self.check_value("local->site_id", self.this_site_id))
-
- # Now we're set up.
- self.send_cmd("break ticket_cron")
- self.send_cmd("break booth_udp_send if to == &(booth_conf->site[1])")
- self.send_cmd("break recvfrom")
self.running = False
# }}}
@@ -269,6 +277,8 @@
def drain_booth_log(self):
try:
self.booth.read_nonblocking(64*1024, 0)
+ except pexpect.EOF:
+ pass
except pexpect.TIMEOUT:
pass
finally:
@@ -479,8 +489,11 @@
time.sleep(1)
self.drain_booth_log()
# stop it
- posix.kill(self.booth.pid, signal.SIGINT)
- posix.kill(self.gdb.pid, signal.SIGINT)
+ self.booth.sendintr()
+ # This additional signal seems to be unnecessary.
+ #posix.kill(self.gdb.pid, signal.SIGINT)
+ # In case it's really needed we should drain booth's signals queue,
+ # eg. by sending "print getpid()" twice, before the sync() call.
self.running = False
self.sync(2000)
@@ -500,18 +513,22 @@
sys.exit(1)
- def run(self, start_from="000"):
+ def run(self, start_from="000", end_with="999"):
os.chdir(self.test_base)
# TODO: sorted, random order
tests = filter( (lambda f: re.match(r"^\d\d\d_.*\.txt$", f)), glob.glob("*"))
tests.sort()
+ failed = 0
for f in tests:
- if f < start_from:
+ if f[0:3] < start_from:
+ continue
+ if f[0:3] > end_with:
continue
log = None
logfn = UT._filename(f)
if self.running_on_console():
sys.stdout.write("\n")
+ self.current_nr = "setup"
try:
log = self.setup_log(filename = logfn)
@@ -526,10 +543,11 @@
self.loop(f, test)
self.do_finally(test.get("finally"))
- self.current_nr = None
+ self.current_nr = "teardown"
logging.warn(self.colored_string("Finished test '%s' - OK" % f, self.GREEN))
except:
- logging.error(self.colored_string("Broke in %s:%d %s" % (f, self.current_nr, sys.exc_info()), self.RED))
+ failed += 1
+ logging.error(self.colored_string("Broke in %s:%s %s" % (f, self.current_nr, sys.exc_info()), self.RED))
for frame in traceback.format_tb(sys.exc_traceback):
logging.info(" - %s " % frame.rstrip())
finally:
@@ -539,7 +557,7 @@
logging.getLogger("").removeHandler(log)
if self.running_on_console():
sys.stdout.write("\n")
- return
+ return failed
# }}}
@@ -587,6 +605,9 @@
starting = "0"
if len(sys.argv) > 3:
starting = sys.argv[3]
- ret = ut.run(starting)
+ ending = "999"
+ if len(sys.argv) > 4:
+ ending = sys.argv[4]
+ ret = ut.run(starting, ending)
sys.exit(ret)
# }}}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/main.c new/booth/src/main.c
--- old/booth/src/main.c 2014-02-17 13:11:17.000000000 +0100
+++ new/booth/src/main.c 2014-02-24 13:41:07.000000000 +0100
@@ -798,6 +798,7 @@
printf(" -c FILE Specify config file [default " BOOTH_DEFAULT_CONF "]\n");
printf(" Can be a path or a name without \".conf\" suffix\n");
printf(" -D Enable debugging to stderr and don't fork\n");
+ printf(" -S Systemd mode (no forking)\n");
printf(" -t ticket name\n");
printf(" -s site name\n");
printf(" -l LOCKFILE Specify lock file path (daemon only)\n");
@@ -806,7 +807,7 @@
printf("Please see the man page for details.\n");
}
-#define OPTION_STRING "c:Dl:t:s:h"
+#define OPTION_STRING "c:Dl:t:s:hS"
void safe_copy(char *dest, char *value, size_t buflen, const char *description) {
@@ -932,8 +933,10 @@
}
break;
case 'D':
- daemonize = 1;
debug_level++;
+ /* Fall through */
+ case 'S':
+ daemonize = 1;
break;
case 'l':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/pacemaker.c new/booth/src/pacemaker.c
--- old/booth/src/pacemaker.c 2014-02-17 13:11:17.000000000 +0100
+++ new/booth/src/pacemaker.c 2014-02-24 13:41:07.000000000 +0100
@@ -27,7 +27,74 @@
#include "pacemaker.h"
#include "inline-fn.h"
-#define COMMAND_MAX 256
+
+enum atomic_ticket_supported {
+ YES=0,
+ NO,
+ FILENOTFOUND, /* Ie. UNKNOWN */
+ UNKNOWN = FILENOTFOUND,
+};
+/* http://thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx */
+
+
+enum atomic_ticket_supported atomicity = UNKNOWN;
+
+
+
+#define COMMAND_MAX 1024
+
+
+/** Determines whether the installed crm_ticket can do atomic ticket grants,
+ * _including_ multiple attribute changes.
+ *
+ * See
+ * https://bugzilla.novell.com/show_bug.cgi?id=855099
+ *
+ * Run "crm_ticket" without "--force";
+ * - the old version asks for "Y/N" via STDIN, and returns 0
+ * when reading "no";
+ * - the new version just reports an error without asking.
+ */
+static void test_atomicity(void)
+{
+ int rv;
+
+ if (atomicity != UNKNOWN)
+ return;
+
+ rv = system("echo n | crm_ticket -g -t any-ticket-name > /dev/null 2> /dev/null");
+ if (rv == -1) {
+ log_error("Cannot run \"crm_ticket\"!");
+ /* BIG problem. Abort. */
+ exit(1);
+ }
+
+ if (WIFSIGNALED(rv)) {
+ log_error("\"crm_ticket\" terminated by a signal!");
+ /* Problem. Abort. */
+ exit(1);
+ }
+
+ switch (WEXITSTATUS(rv)) {
+ case 0:
+ atomicity = NO;
+ log_info("Old \"crm_ticket\" found, using non-atomic ticket updates.");
+ break;
+
+ case 1:
+ atomicity = YES;
+ log_info("New \"crm_ticket\" found, using atomic ticket updates.");
+ break;
+
+ default:
+ log_error("Unexpected return value from \"crm_ticket\" (%d), "
+ "falling back to non-atomic ticket updates.",
+ rv);
+ atomicity = NO;
+ }
+
+ assert(atomicity == YES || atomicity == NO);
+}
static const char * interpret_rv(int rv)
@@ -48,31 +115,86 @@
}
+static int pcmk_write_ticket_atomic(struct ticket_config *tk, int grant)
+{
+ char cmd[COMMAND_MAX];
+ int rv;
+
-static void pcmk_grant_ticket(struct ticket_config *tk)
+ /* The values are appended to "-v", so that NO_OWNER
+ * (which is -1) isn't seen as another option. */
+ snprintf(cmd, COMMAND_MAX,
+ "crm_ticket -t '%s' "
+ "%s --force "
+ "-S owner -v%" PRIi32 " "
+ "-S expires -v%" PRIi64 " "
+ "-S ballot -v%" PRIi64,
+ tk->name,
+ (grant > 0 ? "-g" :
+ grant < 0 ? "-r" :
+ ""),
+ (int32_t)get_node_id(tk->owner),
+ (int64_t)tk->expires,
+ (int64_t)tk->last_ack_ballot);
+
+ rv = system(cmd);
+ log_info("command: '%s' was executed", cmd);
+ if (rv != 0)
+ log_error("error: \"%s\" failed, %s", cmd, interpret_rv(rv));
+
+ return rv;
+}
+
+
+static int pcmk_store_ticket_nonatomic(struct ticket_config *tk);
+
+static int pcmk_grant_ticket(struct ticket_config *tk)
{
char cmd[COMMAND_MAX];
int rv;
+
+ test_atomicity();
+ if (atomicity == YES)
+ return pcmk_write_ticket_atomic(tk, +1);
+
+
+ rv = pcmk_store_ticket_nonatomic(tk);
+ if (rv)
+ return rv;
+
snprintf(cmd, COMMAND_MAX, "crm_ticket -t %s -g --force",
tk->name);
log_info("command: '%s' was executed", cmd);
rv = system(cmd);
if (rv != 0)
log_error("error: \"%s\" failed, %s", cmd, interpret_rv(rv));
+ return rv;
}
-static void pcmk_revoke_ticket(struct ticket_config *tk)
+
+static int pcmk_revoke_ticket(struct ticket_config *tk)
{
char cmd[COMMAND_MAX];
int rv;
+
+ test_atomicity();
+ if (atomicity == YES)
+ return pcmk_write_ticket_atomic(tk, -1);
+
+
+ rv = pcmk_store_ticket_nonatomic(tk);
+ if (rv)
+ return rv;
+
snprintf(cmd, COMMAND_MAX, "crm_ticket -t %s -r --force",
tk->name);
log_info("command: '%s' was executed", cmd);
rv = system(cmd);
if (rv != 0)
log_error("error: \"%s\" failed, %s", cmd, interpret_rv(rv));
+ return rv;
}
@@ -90,17 +212,29 @@
(rv = system(cmd));
i++) ;
- log_info("'%s' gave result %s", cmd, interpret_rv(rv));
+ log_debug("'%s' gave result %s", cmd, interpret_rv(rv));
return rv;
}
-static void pcmk_store_ticket(struct ticket_config *tk)
+static int pcmk_store_ticket_nonatomic(struct ticket_config *tk)
{
- crm_ticket_set(tk, "owner", (int32_t)get_node_id(tk->owner));
- crm_ticket_set(tk, "expires", tk->expires);
- crm_ticket_set(tk, "ballot", tk->last_ack_ballot);
+ int rv;
+
+ /* Always try to store *each* attribute, even if there's an error
+ * for one of them. */
+ rv = crm_ticket_set(tk, "owner", (int32_t)get_node_id(tk->owner));
+ rv = crm_ticket_set(tk, "expires", tk->expires) || rv;
+ rv = crm_ticket_set(tk, "ballot", tk->last_ack_ballot) || rv;
+
+ if (rv)
+ log_error("setting crm_ticket attributes failed; %s",
+ interpret_rv(rv));
+ else
+ log_info("setting crm_ticket attributes successful");
+
+ return rv;
}
@@ -140,17 +274,22 @@
out:
rv = pclose(p);
- log_info("command \"%s\" returned %s, value %" PRIi64, cmd, interpret_rv(rv), v);
+ log_debug("command \"%s\" returned %s, value %" PRIi64, cmd, interpret_rv(rv), v);
return rv;
}
-static void pcmk_load_ticket(struct ticket_config *tk)
+static int pcmk_load_ticket(struct ticket_config *tk)
{
int rv;
int64_t v;
+ /* This here gets run during startup; testing that here means that
+ * normal operation won't be interrupted with that test. */
+ test_atomicity();
+
+
rv = crm_ticket_get(tk, "expires", &v);
if (!rv) {
tk->expires = v;
@@ -176,12 +315,12 @@
/* We load only when the state is completely unknown. */
tk->state = ST_INIT;
- return;
+ return rv;
}
+
struct ticket_handler pcmk_handler = {
.grant_ticket = pcmk_grant_ticket,
.revoke_ticket = pcmk_revoke_ticket,
- .store_ticket = pcmk_store_ticket,
.load_ticket = pcmk_load_ticket,
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/pacemaker.h new/booth/src/pacemaker.h
--- old/booth/src/pacemaker.h 2014-02-17 13:11:17.000000000 +0100
+++ new/booth/src/pacemaker.h 2014-02-24 13:41:07.000000000 +0100
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2011 Jiaju Zhang
- * Copyright (C) 2013 Philipp Marek
+ * Copyright (C) 2013-2014 Philipp Marek
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -24,10 +24,9 @@
#include "config.h"
struct ticket_handler {
- void (*grant_ticket) (struct ticket_config *tk);
- void (*revoke_ticket) (struct ticket_config *tk);
- void (*store_ticket) (struct ticket_config *tk);
- void (*load_ticket) (struct ticket_config *tk);
+ int (*grant_ticket) (struct ticket_config *tk);
+ int (*revoke_ticket) (struct ticket_config *tk);
+ int (*load_ticket) (struct ticket_config *tk);
};
struct ticket_handler pcmk_handler;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/ticket.c new/booth/src/ticket.c
--- old/booth/src/ticket.c 2014-02-17 13:11:17.000000000 +0100
+++ new/booth/src/ticket.c 2014-02-24 13:41:07.000000000 +0100
@@ -126,8 +126,6 @@
disown_if_expired(tk);
- pcmk_handler.store_ticket(tk);
-
if (tk->owner == local) {
pcmk_handler.grant_ticket(tk);
} else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/tools/booth_resource_monitord.c new/booth/tools/booth_resource_monitord.c
--- old/booth/tools/booth_resource_monitord.c 2014-02-17 13:11:17.000000000 +0100
+++ new/booth/tools/booth_resource_monitord.c 2014-02-24 13:41:07.000000000 +0100
@@ -4,6 +4,7 @@
* When abnormality occurs in a resource, move a ticket to other sites using booth.
*
* Copyright (c) 2012 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
+ * Copyright (c) 2013-2014 Philipp Marek
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/tools/booth_resource_monitord.h new/booth/tools/booth_resource_monitord.h
--- old/booth/tools/booth_resource_monitord.h 2014-02-17 13:11:17.000000000 +0100
+++ new/booth/tools/booth_resource_monitord.h 2014-02-24 13:41:07.000000000 +0100
@@ -4,6 +4,7 @@
* When abnormality occurs in a resource, move a ticket to other sites using booth.
*
* Copyright (c) 2012 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
+ * Copyright (c) 2014 Philipp Marek
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
@@ -122,3 +123,20 @@
gpointer user_data);
void crmd_ipc_connection_destroy(gpointer user_data);
int crmd_connect(void);
+
+
+#ifdef HAVE_LOG_CIB_DIFF
+/* OK */
+#else
+#ifdef HAVE_XML_LOG_PATCHSET
+/* See https://github.com/ClusterLabs/pacemaker, commit
+ * 6953aa52e00c4ddf481254a828f6d7c7826a23b9 */
+ static inline void
+log_cib_diff(int log_level, xmlNode * diff, const char *function)
+{
+ xml_log_patchset(log_level, function, diff);
+}
+#else
+#error "Neither log_cib_diff() nor xml_log_patchset() available."
+#endif
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/unit-tests/bin/crm_ticket new/booth/unit-tests/bin/crm_ticket
--- old/booth/unit-tests/bin/crm_ticket 2014-02-17 13:11:17.000000000 +0100
+++ new/booth/unit-tests/bin/crm_ticket 2014-02-24 13:41:07.000000000 +0100
@@ -8,21 +8,24 @@
function word_after()
{
+# Per default $1 is printed
perl -e '
$search=shift();
$stg=shift();
- print $1 if $stg =~ /$search/;' "$1" "$2"
+ print $'${3:-1}' if $stg =~ /$search/;' "$1" "$2"
}
function Get()
{
- which=$(word_after " -G '(\\w+)'" "$1")
+ which=$(word_after " -G ('?)(\\w+)\\1" "$1" 2)
if [[ -z "$which" ]] ; then
exit 1
fi
word_after "\\b$which\\b (\\S+)" "$UNIT_TEST_AUX"
+ # provide a newline
+ echo ""
exit 0
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org