[Debian-ha-svn-commits] [SCM] openais Debian packaging branch, master, updated. debian/1.1.2-1

Guido Günther agx at sigxcpu.org
Mon Mar 8 13:09:56 UTC 2010


The following commit has been merged in the master branch:
commit 8d49e55fa7efdfbe4210c9314a66f267fc170989
Author: Guido Günther <agx at sigxcpu.org>
Date:   Mon Mar 8 13:59:12 2010 +0100

    Imported Upstream version 1.1.2

diff --git a/CHANGELOG b/CHANGELOG
index 403e09c..e35685c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,98 @@
 ------------------------------------------------------------------------
+r2115 | rohara | 2010-01-26 11:41:45 -0600 (Tue, 26 Jan 2010) | 5 lines
+
+Merge trunk revision 2093
+r2093 | fabbione | 2009-12-10 13:37:08 -0600 (Thu, 10 Dec 2009) | 2 lines
+
+bump trunk version to 1.1.2
+
+------------------------------------------------------------------------
+r2114 | rohara | 2010-01-26 11:36:31 -0600 (Tue, 26 Jan 2010) | 5 lines
+
+Merge trunk revision 2112
+r2112 | rohara | 2010-01-26 11:32:18 -0600 (Tue, 26 Jan 2010) | 4 lines
+
+Remove crypto content from LICENSE file.
+
+------------------------------------------------------------------------
+r2113 | rohara | 2010-01-26 11:35:03 -0600 (Tue, 26 Jan 2010) | 5 lines
+
+Merge trunk revision 2087
+r2087 | fabbione | 2009-12-04 01:09:38 -0600 (Fri, 04 Dec 2009) | 3 lines
+
+Update init script to be more generic and LSB compliant
+
+------------------------------------------------------------------------
+r2111 | rohara | 2010-01-21 16:05:37 -0600 (Thu, 21 Jan 2010) | 5 lines
+
+Merge trunk revision 2110
+r2110 | sdake | 2010-01-21 15:56:58 -0600 (Thu, 21 Jan 2010) | 2 lines
+
+Update to openais.spec.in to fix URL and File location
+
+------------------------------------------------------------------------
+r2109 | rohara | 2010-01-21 15:53:37 -0600 (Thu, 21 Jan 2010) | 10 lines
+
+Merge trunk revision 2103
+r2103 | honzaf | 2010-01-18 06:47:19 -0600 (Mon, 18 Jan 2010) | 7 lines
+
+Prevents iteration of a checkpoint section during sync
+
+Prevents iteration of a checkpoint section during
+synchronization because the iteration data could change.
+
+Forward-port of whitetank 2096
+
+------------------------------------------------------------------------
+r2108 | rohara | 2010-01-21 15:52:24 -0600 (Thu, 21 Jan 2010) | 6 lines
+
+Merge trunk revision 2102
+r2102 | rohara | 2010-01-15 09:36:53 -0600 (Fri, 15 Jan 2010) | 5 lines
+
+Fix saMsgDispatch such that it will break out of switch if callback is
+received and is undefined.
+
+------------------------------------------------------------------------
+r2107 | rohara | 2010-01-21 15:51:06 -0600 (Thu, 21 Jan 2010) | 6 lines
+
+Merge trunk revision 2101
+r2101 | rohara | 2010-01-15 09:36:15 -0600 (Fri, 15 Jan 2010) | 5 lines
+
+Fix saClmDispatch such that it will break out of switch if callback is
+received and is undefined.
+
+------------------------------------------------------------------------
+r2106 | rohara | 2010-01-21 15:50:06 -0600 (Thu, 21 Jan 2010) | 6 lines
+
+Merge trunk revision 2100
+r2100 | rohara | 2010-01-15 09:35:30 -0600 (Fri, 15 Jan 2010) | 5 lines
+
+Fix saLckDispatch such that it will break out of switch if callback is
+received and is undefined.
+
+------------------------------------------------------------------------
+r2105 | rohara | 2010-01-21 15:48:43 -0600 (Thu, 21 Jan 2010) | 6 lines
+
+Merge trunk revision 2099
+r2099 | rohara | 2010-01-15 09:34:57 -0600 (Fri, 15 Jan 2010) | 5 lines
+
+Fix saTmrDispatch such that it will break out of switch if callback is
+received and is undefined.
+
+------------------------------------------------------------------------
+r2104 | rohara | 2010-01-21 15:47:09 -0600 (Thu, 21 Jan 2010) | 6 lines
+
+Merge trunk revision 2098
+r2098 | rohara | 2010-01-15 09:34:19 -0600 (Fri, 15 Jan 2010) | 5 lines
+
+Fix saCkptDispatch such that it will break out of switch if callback is
+received and is undefined.
+
+------------------------------------------------------------------------
+r2085 | rohara | 2009-12-03 15:01:29 -0600 (Thu, 03 Dec 2009) | 1 line
+
+Bumping version to 1.1.1
+------------------------------------------------------------------------
 r2084 | rohara | 2009-12-03 14:53:31 -0600 (Thu, 03 Dec 2009) | 6 lines
 
 Merge trunk revision 2080:
diff --git a/LICENSE b/LICENSE
index 0bf383e..b20942e 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,20 +1,5 @@
-***
-All cryptographic software in this package is subject to the following legal
-notice:
-This package includes publicly available encryption source code which,
-together with object code resulting from the compiling of publicly
-available source code, may be exported from the United States under License
-Exception TSU prsuant to 15 C.F.R Section 740.13(e).
-***
------------------------------------------------------------------------------
-The following license applies to every file in this package except for
-the files exec/crypto.c and exec/crypto.h.  The license for these files is
-described later in this document.  Some files are contributed by other authors
-and hence not copyright MontaVista Software.  In this case, the license is
-still as follows:
------------------------------------------------------------------------------
-
 Copyright (c) 2002-2004 MontaVista Software, Inc.
+Copyright (c) 2005-2010 Red Hat, Inc.
 
 All rights reserved.
 
@@ -43,17 +28,3 @@ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 THE POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------------------------
-The openais project uses software from the LibTomCrypt project
-www.libtomcrypt.org.  This software is contained the files exec/crypto.c and
-exec/crypto.h.  The following license applies to the files exec/crypto.c and
-exec/crytpo.h:
------------------------------------------------------------------------------
-LibTomCrypt is public domain.  As should all quality software be.
-
-All of the software was either written by or donated to Tom St Denis for the
-purposes of this project.  The only exception is the SAFER.C source which has
-no known license status (assumed copyrighted) which is why SAFER,C is shipped
-as disabled.
-
-Tom St Denis
diff --git a/Makefile.in b/Makefile.in
index 36bd510..a542214 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -182,6 +182,7 @@ EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 GREP = @GREP@
 GROFF = @GROFF@
+INITDDIR = @INITDDIR@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
diff --git a/configure b/configure
index 1ac9c28..83fb924 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for openais 1.1.1.
+# Generated by GNU Autoconf 2.63 for openais 1.1.2.
 #
 # Report bugs to <openais at lists.osdl.org>.
 #
@@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='openais'
 PACKAGE_TARNAME='openais'
-PACKAGE_VERSION='1.1.1'
-PACKAGE_STRING='openais 1.1.1'
+PACKAGE_VERSION='1.1.2'
+PACKAGE_STRING='openais 1.1.2'
 PACKAGE_BUGREPORT='openais at lists.osdl.org'
 
 ac_unique_file="lib/clm.c"
@@ -656,6 +656,7 @@ SOMICRO
 SOMINOR
 SOMAJOR
 LCRSODIR
+INITDDIR
 CP
 coroipcc_LIBS
 coroipcc_CFLAGS
@@ -761,6 +762,7 @@ enable_dependency_tracking
 enable_fatal_warnings
 enable_debug
 enable_coverage
+with_initddir
 with_lcrso_dir
 '
       ac_precious_vars='build_alias
@@ -1329,7 +1331,7 @@ if test "$ac_init_help" = "long"; then
   # 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 openais 1.1.1 to adapt to many kinds of systems.
+\`configure' configures openais 1.1.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1399,7 +1401,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of openais 1.1.1:";;
+     short | recursive ) echo "Configuration of openais 1.1.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1416,6 +1418,7 @@ Optional Features:
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-initddir=DIR     : path to init script directory.
   --with-lcrso-dir=DIR    : corosync lcrso files.
 
 Some influential environment variables:
@@ -1503,7 +1506,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-openais configure 1.1.1
+openais configure 1.1.2
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1517,7 +1520,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by openais $as_me 1.1.1, which was
+It was created by openais $as_me 1.1.2, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -2366,7 +2369,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='openais'
- VERSION='1.1.1'
+ VERSION='1.1.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -10464,6 +10467,15 @@ fi
 
 
 
+# Check whether --with-initddir was given.
+if test "${with_initddir+set}" = set; then
+  withval=$with_initddir;  INITDDIR="$withval"
+else
+   INITDDIR="$sysconfdir/init.d"
+fi
+
+
+
 # Check whether --with-lcrso-dir was given.
 if test "${with_lcrso_dir+set}" = set; then
   withval=$with_lcrso_dir;  LCRSODIR="$withval"
@@ -10640,6 +10652,7 @@ LDFLAGS="$ENV_LDFLAGS $COVERAGE_LDFLAGS $OS_LDFLAGS"
 
 
 
+
  if test -n "${DARWIN_OPTS}"; then
   BUILD_DARWIN_TRUE=
   BUILD_DARWIN_FALSE='#'
@@ -11151,7 +11164,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by openais $as_me 1.1.1, which was
+This file was extended by openais $as_me 1.1.2, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -11218,7 +11231,7 @@ Report bugs to <bug-autoconf at gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-openais config.status 1.1.1
+openais config.status 1.1.2
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -12244,6 +12257,8 @@ $as_echo "  Arch-independent files   = ${datadir}" >&6; }
 $as_echo "  State information        = ${localstatedir}" >&6; }
 { $as_echo "$as_me:$LINENO: result:   System configuration     = ${sysconfdir}" >&5
 $as_echo "  System configuration     = ${sysconfdir}" >&6; }
+{ $as_echo "$as_me:$LINENO: result:   System init.d directory  = ${INITDDIR}" >&5
+$as_echo "  System init.d directory  = ${INITDDIR}" >&6; }
 { $as_echo "$as_me:$LINENO: result:   corosync config dir      = ${COROSYSCONFDIR}" >&5
 $as_echo "  corosync config dir      = ${COROSYSCONFDIR}" >&6; }
 { $as_echo "$as_me:$LINENO: result:   LCRSO                    = ${LCRSODIR}" >&5
diff --git a/configure.ac b/configure.ac
index 61f1395..32cf293 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@
 # bootstrap / init
 AC_PREREQ([2.61])
 
-AC_INIT([openais], [1.1.1], [openais at lists.osdl.org])
+AC_INIT([openais], [1.1.2], [openais at lists.osdl.org])
 AM_INIT_AUTOMAKE([-Wno-portability])
 
 AC_CONFIG_SRCDIR([lib/clm.c])
@@ -170,6 +170,11 @@ AC_ARG_ENABLE([coverage],
 	[  --enable-coverage       : coverage analysis of the codebase. ],
 	[ default="no" ])
 
+AC_ARG_WITH([initddir],
+	[  --with-initddir=DIR     : path to init script directory. ],
+	[ INITDDIR="$withval" ],
+	[ INITDDIR="$sysconfdir/init.d" ])
+
 AC_ARG_WITH([lcrso-dir],
 	[  --with-lcrso-dir=DIR    : corosync lcrso files. ],
 	[ LCRSODIR="$withval" ],
@@ -311,6 +316,7 @@ CPPFLAGS="$ENV_CPPFLAGS $OS_CPPFLAGS"
 LDFLAGS="$ENV_LDFLAGS $COVERAGE_LDFLAGS $OS_LDFLAGS"
 
 # substitute what we need:
+AC_SUBST([INITDDIR])
 AC_SUBST([LCRSODIR])
 
 AC_SUBST([SOMAJOR])
@@ -350,6 +356,7 @@ AC_MSG_RESULT([  Header files             = ${includedir}])
 AC_MSG_RESULT([  Arch-independent files   = ${datadir}])
 AC_MSG_RESULT([  State information        = ${localstatedir}])
 AC_MSG_RESULT([  System configuration     = ${sysconfdir}])
+AC_MSG_RESULT([  System init.d directory  = ${INITDDIR}])
 AC_MSG_RESULT([  corosync config dir      = ${COROSYSCONFDIR}])
 AC_MSG_RESULT([  LCRSO                    = ${LCRSODIR}])
 AC_MSG_RESULT([  Features                 = ${PACKAGE_FEATURES}])
diff --git a/include/Makefile.in b/include/Makefile.in
index 8056957..8395b18 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -117,6 +117,7 @@ EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 GREP = @GREP@
 GROFF = @GROFF@
+INITDDIR = @INITDDIR@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
diff --git a/init/Makefile.am b/init/Makefile.am
index d495c13..aa88e31 100644
--- a/init/Makefile.am
+++ b/init/Makefile.am
@@ -34,4 +34,30 @@
 
 MAINTAINERCLEANFILES	= Makefile.in
 
-EXTRA_DIST		= generic mvlcge README redhat
+EXTRA_DIST		= generic.in
+
+target_INIT		= generic
+
+%: %.in Makefile
+	rm -f $@-t $@
+	sed \
+		-e 's#@''SBINDIR@#$(sbindir)#g' \
+		-e 's#@''SYSCONFDIR@#$(sysconfdir)#g' \
+		-e 's#@''INITDDIR@#$(INITDDIR)#g' \
+		-e 's#@''LOCALSTATEDIR@#$(localstatedir)#g' \
+	    $< > $@-t
+	chmod 0755 $@-t
+	mv $@-t $@
+
+all-local: $(target_INIT)
+
+clean-local:
+	rm -rf $(target_INIT)
+
+install-exec-local:
+	$(INSTALL) -d $(DESTDIR)/$(INITDDIR)
+	$(INSTALL) -m 755 generic $(DESTDIR)/$(INITDDIR)/openais
+
+uninstall-local:
+	cd $(DESTDIR)/$(INITDDIR) && \
+		rm -f openais
diff --git a/init/Makefile.in b/init/Makefile.in
index 42e0ff6..c7a7566 100644
--- a/init/Makefile.in
+++ b/init/Makefile.in
@@ -68,7 +68,7 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = init
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -106,6 +106,7 @@ EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 GREP = @GREP@
 GROFF = @GROFF@
+INITDDIR = @INITDDIR@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -195,7 +196,8 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 MAINTAINERCLEANFILES = Makefile.in
-EXTRA_DIST = generic mvlcge README redhat
+EXTRA_DIST = generic.in
+target_INIT = generic
 all: all-am
 
 .SUFFIXES:
@@ -268,7 +270,7 @@ distdir: $(DISTFILES)
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile
+all-am: Makefile all-local
 installdirs:
 install: install-am
 install-exec: install-exec-am
@@ -298,7 +300,7 @@ maintainer-clean-generic:
 	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
 clean: clean-am
 
-clean-am: clean-generic mostlyclean-am
+clean-am: clean-generic clean-local mostlyclean-am
 
 distclean: distclean-am
 	-rm -f Makefile
@@ -322,7 +324,7 @@ install-dvi: install-dvi-am
 
 install-dvi-am:
 
-install-exec-am:
+install-exec-am: install-exec-local
 
 install-html: install-html-am
 
@@ -360,21 +362,47 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am:
+uninstall-am: uninstall-local
 
 .MAKE: install-am install-strip
 
-.PHONY: all all-am check check-am clean clean-generic distclean \
-	distclean-generic distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
+.PHONY: all all-am all-local check check-am clean clean-generic \
+	clean-local distclean distclean-generic distdir dvi dvi-am \
+	html html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-exec-local install-html \
 	install-html-am install-info install-info-am install-man \
 	install-pdf install-pdf-am install-ps install-ps-am \
 	install-strip installcheck installcheck-am installdirs \
 	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
+	mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
+	uninstall-local
 
 
+%: %.in Makefile
+	rm -f $@-t $@
+	sed \
+		-e 's#@''SBINDIR@#$(sbindir)#g' \
+		-e 's#@''SYSCONFDIR@#$(sysconfdir)#g' \
+		-e 's#@''INITDDIR@#$(INITDDIR)#g' \
+		-e 's#@''LOCALSTATEDIR@#$(localstatedir)#g' \
+	    $< > $@-t
+	chmod 0755 $@-t
+	mv $@-t $@
+
+all-local: $(target_INIT)
+
+clean-local:
+	rm -rf $(target_INIT)
+
+install-exec-local:
+	$(INSTALL) -d $(DESTDIR)/$(INITDDIR)
+	$(INSTALL) -m 755 generic $(DESTDIR)/$(INITDDIR)/openais
+
+uninstall-local:
+	cd $(DESTDIR)/$(INITDDIR) && \
+		rm -f openais
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/init/README b/init/README
deleted file mode 100644
index 59306b6..0000000
--- a/init/README
+++ /dev/null
@@ -1,5 +0,0 @@
-This directory contains init scripts used to start and stop openais.
-
-redhat contains an init script for Red Hat systems.
-mvlcge contains an init script for MontaVista Linux systems.
-generic contains an init script for Generic Systems.
diff --git a/init/generic b/init/generic
deleted file mode 100755
index e0f6b27..0000000
--- a/init/generic
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/bin/sh
-#
-# corosync       Start the OpenAIS
-#
-# Author:       Andrew Beekhof <abeekhof at suse.de>
-# License:      Revised BSD
-#
-# chkconfig: - 20 20
-# processname:  corosync
-# description:  OpenAIS
-#
-### BEGIN INIT INFO
-# Description: corosync....
-#
-# Short-Description: OpenAIS
-# Provides: corosync
-# Required-Start: $network
-# Should-Start: $syslog
-# Required-Stop: $network
-# Default-Start: 3 5
-# Default-Stop: 0 6
-### END INIT INFO
-
-do_force=0
-prog="corosync"
-lockfile="/var/lock/subsys/$prog"
-
-internal_status() {
-    killall -0 corosync > /dev/null 2>&1
-    return $?
-}
-
-status() {
-    if
-	! internal_status
-    then
-	echo "Stopped"
-	return 7
-    fi
-
-    echo "Running"
-    return 0
-}
-
-start() {
-    echo -n $"Starting OpenAIS ($prog): "
-    if
-	! internal_status
-    then
-	echo -n "starting... "
-	export COROSYNC_DEFAULT_CONFIG_IFACE="openaisserviceenableexperimental:corosync_parser"
-	$prog 2>&1 > /dev/null 2>&1
-	echo -n "rc=$?: "
-    fi
-
-    sleep 2 # give it time to fail... $? isn't definitive
-
-    if
-	internal_status
-    then
-	echo "OK"
-	return 0
-    fi
-
-    echo "Failed"
-    return 1
-}
-
-do_force=0
-do_forever=1
-
-stop() {
-    echo -n $"Stopping OpenAIS ($prog): "
-
-    killall -QUIT corosync
-
-    if [ $do_forever = 0 ]; then
-	for i in 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20; do
-	    if
-		internal_status
-	    then
-		sleep 2
-		echo -n "."
-	    else
-		rm -f "$lockfile"
-		echo "OK"
-		return 0
-	    fi
-	done
-
-	if [ $do_force = 1 ]; then
-	    echo -n "Escalating... "
-	    killall -KILL corosync
-	    sleep 5
-
-	    if
-		! internal_status
-	    then
-		rm -f "$lockfile"
-		echo "OK"
-		return 0
-	    fi
-	fi
-
-	echo "Failed"
-	return 1
-    fi
-
-    while
-        internal_status
-    do
-	sleep 1
-	echo -n "."
-    done
-
-    rm -f "$lockfile"
-    echo "OK"
-    return 0
-}
-
-restart() {
-    stop
-    start
-}
-
-case "$1" in
-    start|stop|restart)
-        $1
-        ;;
-    force-stop)
-	do_force=1
-        stop
-        ;;
-    reload|force-reload)
-        restart
-        ;;
-    condrestart|try-restart)
-        [ ! -f "$lockfile" ] || restart
-        ;;
-    status)
-        status $prog
-        ;;
-    *)
-        echo $"Usage: $0 {start|stop|restart|try-restart|condrestart|reload|force-reload|force-stop|status}"
-        exit 2
-esac
diff --git a/init/generic.in b/init/generic.in
new file mode 100644
index 0000000..ac63a5f
--- /dev/null
+++ b/init/generic.in
@@ -0,0 +1,150 @@
+#!/bin/bash
+
+# Authors:
+#  Andrew Beekhof <abeekhof at redhat.com>
+#  Fabio M. Di Nitto <fdinitto at redhat.com>
+#
+# License: Revised BSD
+
+# chkconfig: - 20 20
+# description: OpenAIS
+# processname: corosync
+#
+### BEGIN INIT INFO
+# Provides:		openais
+# Required-Start:	$network
+# Should-Start:		$syslog
+# Required-Stop:	$network
+# Default-Start:
+# Default-Stop:
+# Short-Description:	Starts and stops OpenAIS.
+# Description:		Starts and stops OpenAIS.
+### END INIT INFO
+
+desc="OpenAIS"
+prog="openais"
+exec="aisexec"
+proc="corosync"
+
+# set secure PATH
+PATH="/sbin:/bin:/usr/sbin:/usr/bin:@SBINDIR@"
+
+success()
+{
+	echo -ne "[  OK  ]\r"
+}
+
+failure()
+{
+	echo -ne "[FAILED]\r"
+}
+
+status()
+{
+	pid=$(pidof $1 2>/dev/null)
+	rtrn=$?
+	if [ $rtrn -ne 0 ]; then
+		echo "$1 is stopped"
+	else
+		echo "$1 (pid $pid) is running..."
+	fi
+	return $rtrn
+}
+
+# rpm based distros
+if [ -d @SYSCONFDIR@/sysconfig ]; then
+	[ -f @INITDDIR@/functions ] && . @INITDDIR@/functions
+	[ -f @SYSCONFDIR@/sysconfig/$prog ] && . @SYSCONFDIR@/sysconfig/$prog
+	[ -z "$LOCK_FILE" ] && LOCK_FILE="@LOCALSTATEDIR@/lock/subsys/$prog"
+fi
+
+# deb based distros
+if [ -d @SYSCONFDIR@/default ]; then
+	[ -f @SYSCONFDIR@/default/$prog ] && . @SYSCONFDIR@/default/$prog
+	[ -z "$LOCK_FILE" ] && LOCK_FILE="@LOCALSTATEDIR@/lock/$prog"
+fi
+
+start()
+{
+	echo -n "Starting $desc ($exec): "
+
+	# most recent distributions use tmpfs for @LOCALSTATEDIR@/run
+	# to avoid to clean it up on every boot.
+	# they also assume that init scripts will create
+	# required subdirectories for proper operations
+	mkdir -p @LOCALSTATEDIR@/run
+
+	if status $proc > /dev/null 2>&1; then
+		success
+	else
+		$exec > /dev/null 2>&1
+
+		# give it time to fail
+		sleep 2
+		if status $proc > /dev/null 2>&1; then
+			touch $LOCK_FILE
+			pidof $proc > @LOCALSTATEDIR@/run/$prog.pid
+			success
+		else
+			failure
+			rtrn=1
+		fi
+	fi
+	echo
+}
+
+stop()
+{
+	! status $proc > /dev/null 2>&1 && return
+
+	echo -n "Signaling $desc ($prog) to terminate: "
+	kill -TERM $(pidof $proc) > /dev/null 2>&1
+	success
+	echo
+
+	echo -n "Waiting for $prog services to unload:"
+	while status $proc > /dev/null 2>&1; do
+		sleep 1
+		echo -n "."
+	done
+
+	rm -f $LOCK_FILE
+	rm -f @LOCALSTATEDIR@/run/$prog.pid
+	success
+	echo
+}
+
+restart()
+{
+	stop
+	start
+}
+
+rtrn=0
+
+case "$1" in
+start)
+	start
+;;
+restart|reload|force-reload)
+	restart
+;;
+condrestart|try-restart)
+	if status $prog > /dev/null 2>&1; then
+		restart
+	fi
+;;
+status)
+	status $prog
+	rtrn=$?
+;;
+stop)
+	stop
+;;
+*)
+	echo "usage: $0 {start|stop|restart|reload|force-reload|condrestart|try-restart|status}"
+	rtrn=2
+;;
+esac
+
+exit $rtrn
diff --git a/init/mvlcge b/init/mvlcge
deleted file mode 100755
index 00152fa..0000000
--- a/init/mvlcge
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /bin/sh
-#
-# Application Interface Specification Startup
-# chkconfig: 2345 20 20
-
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-
-test -f /usr/sbin/corosync | exit 0
-
-case "$1" in
-	start)
- 		echo -n "Starting OpenAIS: "
-		export COROSYNC_DEFAULT_CONFIG_IFACE="openaisserviceenable:openaisparser"
-		start-stop-daemon --start --quiet --exec /usr/sbin/corosync
-		echo "."
-
-		;;
-       	stop)
-		echo -n "Stopping OpenAIS: "
-		start-stop-daemon --stop --quiet --exec /usr/sbin/corosync
-		echo "."
-               	;;
-       	*)
-               echo "Usage: /etc/init.d/openais {start|stop}" >&2
-               exit 1
-               ;;
-esac
diff --git a/init/redhat b/init/redhat
deleted file mode 100755
index 403d06f..0000000
--- a/init/redhat
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-#
-# Corosync daemon init script for Red Hat Linux and compatibles.
-#
-# chkconfig: - 20 20
-# processname:  corosync
-# pidfile:      /var/run/corosync.pid
-# description:  OpenAIS
-
-# Source function library
-. /etc/rc.d/init.d/functions
-
-prog="corosync"
-exec="/usr/sbin/corosync"
-lockfile="/var/lock/subsys/corosync"
-
-[ -x "$exec" ] || exit 0
-
-start() {
-    echo -n $"Starting OpenAIS ($prog): "
-    export COROSYNC_DEFAULT_CONFIG_IFACE="openaisserviceenableexperimental:corosync_parser"
-    daemon $exec
-    retval=$?
-    [ "$retval" -eq 0 ] && touch "$lockfile"
-    echo
-    return $retval
-}
-
-stop() {
-    echo -n $"Stopping OpenAIS ($prog): "
-    killproc $prog
-    retval=$?
-    [ "$retval" -eq 0 ] && rm -f "$lockfile"
-    echo
-    return $retval
-}
-
-restart() {
-    stop
-    start
-}
-
-case "$1" in
-    start|stop|restart)
-        $1
-        ;;
-    reload|force-reload)
-        restart
-        ;;
-    condrestart|try-restart)
-        [ ! -f "$lockfile" ] || restart
-        ;;
-    status)
-        status $prog
-        ;;
-    *)
-        echo $"Usage: $0 {start|stop|restart|try-restart|condrestart|reload|force-reload|status}"
-        exit 2
-esac
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 1f86741..bf2315c 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -177,6 +177,7 @@ EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 GREP = @GREP@
 GROFF = @GROFF@
+INITDDIR = @INITDDIR@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
diff --git a/lib/ckpt.c b/lib/ckpt.c
index edc7d95..d850389 100644
--- a/lib/ckpt.c
+++ b/lib/ckpt.c
@@ -365,7 +365,7 @@ saCkptDispatch (
 		switch (dispatch_data->id) {
 		case MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTOPENASYNC:
 			if (callbacks.saCkptCheckpointOpenCallback == NULL) {
-				continue;
+				break;
 			}
 			res_lib_ckpt_checkpointopenasync = (struct res_lib_ckpt_checkpointopenasync *) dispatch_data;
 
@@ -409,7 +409,7 @@ saCkptDispatch (
 
 		case MESSAGE_RES_CKPT_CHECKPOINT_CHECKPOINTSYNCHRONIZEASYNC:
 			if (callbacks.saCkptCheckpointSynchronizeCallback == NULL) {
-				continue;
+				break;
 			}
 
 			res_lib_ckpt_checkpointsynchronizeasync = (struct res_lib_ckpt_checkpointsynchronizeasync *) dispatch_data;
diff --git a/lib/clm.c b/lib/clm.c
index 37423b0..9c3d3cc 100644
--- a/lib/clm.c
+++ b/lib/clm.c
@@ -319,7 +319,7 @@ saClmDispatch (
 
 		case MESSAGE_RES_CLM_TRACKCALLBACK:
 			if (callbacks.saClmClusterTrackCallback == NULL) {
-				continue;
+				break;
 			}
 			res_lib_clm_clustertrack = (struct res_lib_clm_clustertrack *)dispatch_data;
 			error = SA_AIS_OK;
@@ -350,7 +350,7 @@ saClmDispatch (
 
 		case MESSAGE_RES_CLM_NODEGETCALLBACK:
 			if (callbacks.saClmClusterNodeGetCallback == NULL) {
-				continue;
+				break;
 			}
 			res_clm_nodegetcallback = (struct res_clm_nodegetcallback *)dispatch_data;
 			marshall_from_mar_clm_cluster_node_t (
diff --git a/lib/lck.c b/lib/lck.c
index a768ee3..fcee367 100644
--- a/lib/lck.c
+++ b/lib/lck.c
@@ -345,7 +345,7 @@ saLckDispatch (
 		switch (dispatch_data->id) {
 		case MESSAGE_RES_LCK_RESOURCEOPEN_CALLBACK:
 			if (callbacks.saLckResourceOpenCallback == NULL) {
-				continue;
+				break;
 			}
 			res_lib_lck_resourceopen_callback =
 				(struct res_lib_lck_resourceopen_callback *)dispatch_data;
@@ -374,7 +374,7 @@ saLckDispatch (
 
 		case MESSAGE_RES_LCK_LOCKGRANT_CALLBACK:
 			if (callbacks.saLckLockGrantCallback == NULL) {
-				continue;
+				break;
 			}
 			res_lib_lck_lockgrant_callback =
 				(struct res_lib_lck_lockgrant_callback *)dispatch_data;
@@ -421,7 +421,7 @@ saLckDispatch (
 
 		case MESSAGE_RES_LCK_LOCKWAITER_CALLBACK:
 			if (callbacks.saLckLockWaiterCallback == NULL) {
-				continue;
+				break;
 			}
 			res_lib_lck_lockwaiter_callback =
 				(struct res_lib_lck_lockwaiter_callback *)dispatch_data;
@@ -451,7 +451,7 @@ saLckDispatch (
 
 		case MESSAGE_RES_LCK_RESOURCEUNLOCK_CALLBACK:
 			if (callbacks.saLckResourceUnlockCallback == NULL) {
-				continue;
+				break;
 			}
 			res_lib_lck_resourceunlock_callback =
 				(struct res_lib_lck_resourceunlock_callback *)dispatch_data;
diff --git a/lib/msg.c b/lib/msg.c
index 0ef99d4..480492c 100644
--- a/lib/msg.c
+++ b/lib/msg.c
@@ -295,7 +295,7 @@ saMsgDispatch (
 		{
 		case MESSAGE_RES_MSG_QUEUEOPEN_CALLBACK:
 			if (callbacks.saMsgQueueOpenCallback == NULL) {
-				continue;
+				break;
 			}
 			res_lib_msg_queueopen_callback =
 				(struct res_lib_msg_queueopen_callback *)dispatch_data;
@@ -324,7 +324,7 @@ saMsgDispatch (
 
 		case MESSAGE_RES_MSG_QUEUEGROUPTRACK_CALLBACK:
 			if (callbacks.saMsgQueueGroupTrackCallback == NULL) {
-				continue;
+				break;
 			}
 			res_lib_msg_queuegrouptrack_callback =
 				(struct res_lib_msg_queuegrouptrack_callback *)dispatch_data;			
@@ -354,7 +354,7 @@ saMsgDispatch (
 
 		case MESSAGE_RES_MSG_MESSAGEDELIVERED_CALLBACK:
 			if (callbacks.saMsgMessageDeliveredCallback == NULL) {
-				continue;
+				break;
 			}
 			res_lib_msg_messagedelivered_callback =
 				(struct res_lib_msg_messagedelivered_callback *)dispatch_data;
@@ -367,7 +367,7 @@ saMsgDispatch (
 
 		case MESSAGE_RES_MSG_MESSAGERECEIVED_CALLBACK:
 			if (callbacks.saMsgMessageReceivedCallback == NULL) {
-				continue;
+				break;
 			}
 			res_lib_msg_messagereceived_callback =
 				(struct res_lib_msg_messagereceived_callback *)dispatch_data;
diff --git a/lib/tmr.c b/lib/tmr.c
index 368e6f3..a5e0945 100644
--- a/lib/tmr.c
+++ b/lib/tmr.c
@@ -226,7 +226,7 @@ saTmrDispatch (
 		switch (dispatch_data->id) {
 		case MESSAGE_RES_TMR_TIMEREXPIREDCALLBACK:
 			if (callbacks.saTmrTimerExpiredCallback == NULL) {
-				continue;
+				break;
 			}
 
 			res_lib_tmr_timerexpiredcallback =
diff --git a/man/Makefile.in b/man/Makefile.in
index 3f2f9bc..c740dde 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -132,6 +132,7 @@ EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 GREP = @GREP@
 GROFF = @GROFF@
+INITDDIR = @INITDDIR@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
diff --git a/openais.spec.in b/openais.spec.in
index 9ba7e1c..bdfc38c 100644
--- a/openais.spec.in
+++ b/openais.spec.in
@@ -3,11 +3,11 @@
 Name: openais
 Summary: The openais Standards-Based Cluster Framework executive and APIs
 Version: @version@
-Release: 1%{?alphatag:.%{alphatag}}%{?dist}
+Release: 2%{?alphatag:.%{alphatag}}%{?dist}
 License: BSD
 Group: System Environment/Base
-URL: http://developer.osdl.org/dev/openais/
-Source0: http://www.osdl.org/downloads/openais-%{version}/openais-%{version}.tar.gz
+URL: http://openais.org
+Source0: http://devresources.linuxfoundation.org/dev/openais/downloads/%{name}-%{version}/%{name}-%{version}.tar.gz
 
 # Runtime bits
 Requires(post): /sbin/chkconfig
@@ -29,13 +29,14 @@ BuildRequires: autoconf automake
 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 
 %prep
-%setup -q -n openais-%{version}
+%setup -q -n %{name}-%{version}
 
 %if %{buildtrunk}
 ./autogen.sh
 %endif
 
-%{configure}
+%{configure} \
+	--with-initddir=%{_initddir}
 
 %build
 make %{_smp_mflags}
@@ -44,8 +45,6 @@ make %{_smp_mflags}
 rm -rf %{buildroot}
 
 make install DESTDIR=%{buildroot}
-mkdir -p %{buildroot}%{_initrddir}
-install -m 755 init/redhat %{buildroot}%{_initrddir}/openais
 
 ## tree fixup
 # drop static libs
@@ -69,9 +68,6 @@ if [ $1 -eq 0 ]; then
     /sbin/chkconfig --del openais || :
 fi
 
-%postun
-[ "$1" -ge "1" ] && %{_initrddir}/openais condrestart &>/dev/null || :
-
 %files
 %defattr(-,root,root,-)
 %doc LICENSE README.amf
@@ -96,7 +92,7 @@ fi
 %package -n openaislib
 Summary: The openais Standards-Based Cluster Framework libraries
 Group: System Environment/Libraries
-Conflicts: openais < 0.91-6
+Requires: %{name} = %{version}-%{release}
 
 %description -n openaislib
 This package contains openais libraries.
diff --git a/pkgconfig/Makefile.in b/pkgconfig/Makefile.in
index 4ee7b00..388d25b 100644
--- a/pkgconfig/Makefile.in
+++ b/pkgconfig/Makefile.in
@@ -102,6 +102,7 @@ EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 GREP = @GREP@
 GROFF = @GROFF@
+INITDDIR = @INITDDIR@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
diff --git a/services/Makefile.in b/services/Makefile.in
index bd388eb..16ad9fc 100644
--- a/services/Makefile.in
+++ b/services/Makefile.in
@@ -144,6 +144,7 @@ EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 GREP = @GREP@
 GROFF = @GROFF@
+INITDDIR = @INITDDIR@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
diff --git a/services/ckpt.c b/services/ckpt.c
index 7e5f713..1f350ef 100644
--- a/services/ckpt.c
+++ b/services/ckpt.c
@@ -492,15 +492,15 @@ static struct corosync_lib_handler ckpt_lib_engine[] =
 	},
 	{ /* 14 */
 		.lib_handler_fn		= message_handler_req_lib_ckpt_sectioniterationinitialize,
-		.flow_control		= COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
+		.flow_control		= COROSYNC_LIB_FLOW_CONTROL_REQUIRED
 	},
 	{ /* 15 */
 		.lib_handler_fn		= message_handler_req_lib_ckpt_sectioniterationfinalize,
-		.flow_control		= COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
+		.flow_control		= COROSYNC_LIB_FLOW_CONTROL_REQUIRED
 	},
 	{ /* 16 */
 		.lib_handler_fn		= message_handler_req_lib_ckpt_sectioniterationnext,
-		.flow_control		= COROSYNC_LIB_FLOW_CONTROL_NOT_REQUIRED
+		.flow_control		= COROSYNC_LIB_FLOW_CONTROL_REQUIRED
 	}
 };
 
diff --git a/test/Makefile.in b/test/Makefile.in
index 96d6082..0c11721 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -165,6 +165,7 @@ EGREP = @EGREP@
 EXEEXT = @EXEEXT@
 GREP = @GREP@
 GROFF = @GROFF@
+INITDDIR = @INITDDIR@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@

-- 
openais Debian packaging



More information about the Debian-ha-svn-commits mailing list