rpms/openais/devel openais-trunk-1667.diff, NONE, 1.1 openais.spec, 1.30, 1.31

Fabio M. Di Nitto fabbione at fedoraproject.org
Wed Dec 10 08:11:09 UTC 2008


Author: fabbione

Update of /cvs/pkgs/rpms/openais/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22671

Modified Files:
	openais.spec 
Added Files:
	openais-trunk-1667.diff 
Log Message:
Update to svn trunk at revision 1667 from upstream.


openais-trunk-1667.diff:

--- NEW FILE openais-trunk-1667.diff ---
diff -Naurd openais-0.91/include/mar_clm.h openais-trunk/include/mar_clm.h
--- openais-0.91/include/mar_clm.h	2008-08-14 17:00:36.000000000 +0200
+++ openais-trunk/include/mar_clm.h	2008-11-25 18:39:02.000000000 +0100
@@ -39,6 +39,7 @@
 #include <corosync/swab.h>
 #include "saAis.h"
 #include "saClm.h"
+#include "mar_sa.h"
 #include <corosync/mar_gen.h>
 
 #define MAR_CLM_MAX_ADDRESS_LENGTH 64
@@ -110,7 +111,7 @@
 	dest->node_id = src->nodeId;
 	marshall_to_mar_clm_node_address_t (&dest->node_address,
 		&src->nodeAddress);
-	marshall_to_mar_name_t (&dest->node_name, &src->nodeName);
+	marshall_SaNameT_to_mar_name_t (&dest->node_name, &src->nodeName);
 	dest->member = src->member;
 	dest->boot_timestamp = src->bootTimestamp;
 	dest->initial_view_number = src->initialViewNumber;
@@ -123,7 +124,7 @@
 	dest->nodeId = src->node_id;
 	marshall_from_mar_clm_node_address_t (&dest->nodeAddress,
 		&src->node_address);
-	marshall_from_mar_name_t (&dest->nodeName, &src->node_name);
+	marshall_mar_name_t_to_SaNameT (&dest->nodeName, &src->node_name);
 	dest->member = src->member;
 	dest->bootTimestamp = src->boot_timestamp;
 	dest->initialViewNumber = src->initial_view_number;
diff -Naurd openais-0.91/include/mar_sa.h openais-trunk/include/mar_sa.h
--- openais-0.91/include/mar_sa.h	1970-01-01 01:00:00.000000000 +0100
+++ openais-trunk/include/mar_sa.h	2008-12-07 18:43:30.000000000 +0100
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2008, Allied Telesis Labs, New Zealand
+ *
+ * All rights reserved.
+ *
+ * Author: Angus Salkeld (ahsalkeld at gmail.com)
+ *
+ * This software licensed under BSD license, the text of which follows:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ *   this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * - Neither the name of the MontaVista Software, Inc. nor the names of its
+ *   contributors may be used to endorse or promote products derived from this
+ *   software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * 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.
+ */
+
+#ifndef AIS_MAR_SA_H_DEFINED
+#define AIS_MAR_SA_H_DEFINED
+
+static inline void marshall_SaNameT_to_mar_name_t (
+	mar_name_t *dest,
+	const SaNameT *src)
+{
+	dest->length = src->length;
+	memcpy (dest->value, src->value, SA_MAX_NAME_LENGTH);
+}
+
+static inline void marshall_mar_name_t_to_SaNameT (
+	SaNameT *dest,
+	const mar_name_t *src)
+{
+	dest->length = src->length;
+	memcpy (dest->value, src->value, SA_MAX_NAME_LENGTH);
+}
+
+#endif /* AIS_MAR_SA_H_DEFINED */
+
diff -Naurd openais-0.91/lib/amf.c openais-trunk/lib/amf.c
--- openais-0.91/lib/amf.c	2008-09-17 21:18:35.000000000 +0200
+++ openais-trunk/lib/amf.c	2008-11-25 18:39:02.000000000 +0100
@@ -49,7 +49,7 @@
 #include <saAmf.h>
 #include <corosync/ipc_gen.h>
 #include <ipc_amf.h>
-#include <corosync/ais_util.h>
+#include "util.h"
 
 
 struct res_overlay {
diff -Naurd openais-0.91/lib/ckpt.c openais-trunk/lib/ckpt.c
--- openais-0.91/lib/ckpt.c	2008-07-24 15:20:09.000000000 +0200
+++ openais-trunk/lib/ckpt.c	2008-11-25 18:39:02.000000000 +0100
@@ -53,8 +53,9 @@
 #include "../include/saCkpt.h"
 #include "../include/ipc_ckpt.h"
 #include "../include/mar_ckpt.h"
+#include "../include/mar_sa.h"
 
-#include <corosync/ais_util.h>
+#include "util.h"
 
 struct message_overlay {
 	mar_res_header_t header __attribute__((aligned(8)));
@@ -634,7 +635,7 @@
 
 	req_lib_ckpt_checkpointopen.header.size = sizeof (struct req_lib_ckpt_checkpointopen);
 	req_lib_ckpt_checkpointopen.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTOPEN;
-	marshall_to_mar_name_t (&req_lib_ckpt_checkpointopen.checkpoint_name,
+	marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_checkpointopen.checkpoint_name,
 		(SaNameT *)checkpointName);
 	memcpy (&ckptCheckpointInstance->checkpointName, checkpointName, sizeof (SaNameT));
 	req_lib_ckpt_checkpointopen.async_call = 0;
@@ -759,7 +760,7 @@
 	if (failWithError == SA_AIS_OK) {
 		memcpy (&ckptCheckpointInstance->checkpointName, checkpointName,
 			sizeof (SaNameT));
-		marshall_to_mar_name_t (&req_lib_ckpt_checkpointopen.checkpoint_name,
+		marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_checkpointopen.checkpoint_name,
 			(SaNameT *)checkpointName);
 	}
 
@@ -829,7 +830,7 @@
 
 	req_lib_ckpt_checkpointclose.header.size = sizeof (struct req_lib_ckpt_checkpointclose);
 	req_lib_ckpt_checkpointclose.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTCLOSE;
-	marshall_to_mar_name_t (&req_lib_ckpt_checkpointclose.checkpoint_name,
+	marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_checkpointclose.checkpoint_name,
 		&ckptCheckpointInstance->checkpointName);
 	req_lib_ckpt_checkpointclose.ckpt_id =
 		ckptCheckpointInstance->checkpointId;
@@ -877,7 +878,7 @@
 
 	req_lib_ckpt_checkpointunlink.header.size = sizeof (struct req_lib_ckpt_checkpointunlink);
 	req_lib_ckpt_checkpointunlink.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTUNLINK;
-	marshall_to_mar_name_t (&req_lib_ckpt_checkpointunlink.checkpoint_name,
+	marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_checkpointunlink.checkpoint_name,
 		(SaNameT *)checkpointName);
 
 	pthread_mutex_lock (&ckptInstance->response_mutex);
@@ -916,7 +917,7 @@
 	req_lib_ckpt_checkpointretentiondurationset.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTRETENTIONDURATIONSET;
 
 	req_lib_ckpt_checkpointretentiondurationset.retention_duration = retentionDuration;
-	marshall_to_mar_name_t (&req_lib_ckpt_checkpointretentiondurationset.checkpoint_name,
+	marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_checkpointretentiondurationset.checkpoint_name,
 		&ckptCheckpointInstance->checkpointName);
 	req_lib_ckpt_checkpointretentiondurationset.ckpt_id =
 		ckptCheckpointInstance->checkpointId;
@@ -957,7 +958,7 @@
 
 	req_lib_ckpt_activereplicaset.header.size = sizeof (struct req_lib_ckpt_activereplicaset);
 	req_lib_ckpt_activereplicaset.header.id = MESSAGE_REQ_CKPT_ACTIVEREPLICASET;
-	marshall_to_mar_name_t (&req_lib_ckpt_activereplicaset.checkpoint_name,
+	marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_activereplicaset.checkpoint_name,
 		&ckptCheckpointInstance->checkpointName);
 	req_lib_ckpt_activereplicaset.ckpt_id =
 		ckptCheckpointInstance->checkpointId;
@@ -1000,7 +1001,7 @@
 	req_lib_ckpt_checkpointstatusget.header.size = sizeof (struct req_lib_ckpt_checkpointstatusget);
 	req_lib_ckpt_checkpointstatusget.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_CHECKPOINTSTATUSGET;
 
-	marshall_to_mar_name_t (&req_lib_ckpt_checkpointstatusget.checkpoint_name,
+	marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_checkpointstatusget.checkpoint_name,
 		&ckptCheckpointInstance->checkpointName);
 	req_lib_ckpt_checkpointstatusget.ckpt_id =
 		ckptCheckpointInstance->checkpointId;
@@ -1065,7 +1066,7 @@
 	req_lib_ckpt_sectioncreate.expiration_time = sectionCreationAttributes->expirationTime;
 	req_lib_ckpt_sectioncreate.initial_data_size = initialDataSize;
 
-	marshall_to_mar_name_t (&req_lib_ckpt_sectioncreate.checkpoint_name,
+	marshall_SaNameT_to_mar_name_t (&req_lib_ckpt_sectioncreate.checkpoint_name,
 		&ckptCheckpointInstance->checkpointName);
 	req_lib_ckpt_sectioncreate.ckpt_id =
 		ckptCheckpointInstance->checkpointId;
@@ -1137,7 +1138,7 @@
 	req_lib_ckpt_sectiondelete.header.id = MESSAGE_REQ_CKPT_CHECKPOINT_SECTIONDELETE;
 	req_lib_ckpt_sectiondelete.id_len = sectionId->idLen;
 
-	marshall_to_mar_name_t (
+	marshall_SaNameT_to_mar_name_t (
 		&req_lib_ckpt_sectiondelete.checkpoint_name,
 		&ckptCheckpointInstance->checkpointName);
 	req_lib_ckpt_sectiondelete.ckpt_id =
@@ -1201,7 +1202,7 @@
 	req_lib_ckpt_sectionexpirationtimeset.id_len = sectionId->idLen;
 	req_lib_ckpt_sectionexpirationtimeset.expiration_time = expirationTime;
 
[...1983 lines suppressed...]
 	amf_comp_dn_make (comp, &dn);
 	log_printf (LOG_NOTICE, "Error detected for '%s', recovery "
 		"action: Component restart", dn.value);
@@ -609,7 +609,7 @@
 {
 	struct amf_si_assignment *si_assignment;
 
-	ENTER ("");
+	ENTER ();
 
 	si_assignment = amf_su_get_next_si_assignment(su, NULL);
 
@@ -729,8 +729,7 @@
 static void su_comp_presence_state_changed (struct amf_su *su, 
 	struct amf_comp *comp, int state)
 {
-	ENTER ("'%s', '%s' %d %d", su->name.value, comp->name.value, state,
-		su->restart_control_state);
+	ENTER ();
 	amf_node_t *node = amf_node_find (&comp->su->saAmfSUHostedByNode);
 	switch (state) {
 		case SA_AMF_PRESENCE_INSTANTIATED:
@@ -782,7 +781,7 @@
 					}
 					break;
 				default:
-					dprintf ("state %d", su->restart_control_state);
+					TRACE1 ("state %d", su->restart_control_state);
 					assert (0);
 					break;
 			}
@@ -863,7 +862,7 @@
 					}
 					break;
 				default:
-					dprintf ("state %d", su->restart_control_state);
+					TRACE1 ("state %d", su->restart_control_state);
 					assert (0);
 					break;
 			}
@@ -905,7 +904,7 @@
 					}
 					break;
 				default:
-					dprintf ("state %d", su->restart_control_state);
+					TRACE1 ("state %d", su->restart_control_state);
 					assert (0);
 					break;
 			}
@@ -945,7 +944,7 @@
 				default:
 					log_printf (LOG_LEVEL_NOTICE,"%s %d",su->name.value, 
 						su->restart_control_state);
-					dprintf ("state %d", su->restart_control_state);
+					TRACE1 ("state %d", su->restart_control_state);
 					assert (0);
 					break;
 			}
@@ -965,7 +964,7 @@
 static void su_comp_op_state_changed (
 	struct amf_su *su, struct amf_comp *comp, int state)
 {
-	ENTER ("'%s', '%s' %d", su->name.value, comp->name.value, state);
+	ENTER ();
 
 	switch (state) {
 		case SA_AMF_OPERATIONAL_ENABLED:
@@ -1064,7 +1063,7 @@
 static void su_rc_enter_idle_escalation_level_1 (amf_comp_t *component,
 	SaAmfRecommendedRecoveryT recommended_recovery)
 {
-	ENTER("");
+	ENTER();
 	component->su->restart_control_state = SU_RC_IDLE_ESCALATION_LEVEL_1;
 	if (has_component_restarted_max_times (component, component->su)) {
 		component->su->restart_control_state = SU_RC_IDLE_ESCALATION_LEVEL_2;
@@ -1076,7 +1075,7 @@
 static void su_rc_enter_idle_escalation_level_2 (amf_comp_t *component,
 	SaAmfRecommendedRecoveryT recommended_recovery)
 {
-	ENTER("");
+	ENTER();
 	component->su->restart_control_state = SU_RC_IDLE_ESCALATION_LEVEL_2;
 	amf_node_t *node = amf_node_find (&component->su->saAmfSUHostedByNode);
 	amf_node_comp_restart_req (node, component); 
@@ -1157,7 +1156,7 @@
 {
 	int is_instantiating = 1;
 
-	ENTER ("'%s %d'", su->name.value, su->saAmfSUPresenceState);
+	ENTER ();
 	switch (su->saAmfSUPresenceState) {
 		case SA_AMF_PRESENCE_UNINSTANTIATED:
 			instantiate_all_components_in_level(su, 
@@ -1186,7 +1185,7 @@
  */
 void amf_su_terminate (struct amf_su *su)
 {
-	ENTER ("'%s'", su->name.value);
+	ENTER ();
 	su->current_comp_instantiation_level = get_instantiation_max_level (su);
 
 	terminate_all_components_in_level (su, su->current_comp_instantiation_level);
@@ -1203,8 +1202,7 @@
 	struct amf_comp *comp,
 	SaAmfRecommendedRecoveryT recommended_recovery)
 {
-	ENTER ("Comp '%s', SU '%s' %d", comp->name.value, su->name.value,
-		su->restart_control_state);
+	ENTER ();
 
 	switch (su->restart_control_state) {
 		case SU_RC_IDLE_ESCALATION_LEVEL_0:
@@ -1255,7 +1253,7 @@
 				SU_COMP_ERROR_SUSPECTED_EV); 
 			break;
 		default:
-			dprintf ("restart_control_state = %d",su->restart_control_state);
+			TRACE1 ("restart_control_state = %d",su->restart_control_state);
 			break;
 	}
 }
@@ -1268,7 +1266,7 @@
 {
 	SaNameT dn;
 
-	ENTER ("'%s'", su->name.value);
+	ENTER ();
 
 	amf_su_dn_make (su, &dn);
 	log_printf (LOG_NOTICE, "Error detected for '%s', recovery "
@@ -1316,7 +1314,7 @@
 	struct amf_comp *comp;
 	struct amf_csi_assignment *csi_assignment;
 	int all_confirmed = 1;
-	ENTER ("");
+	ENTER ();
 	tmp_si_assignment = amf_su_get_next_si_assignment(si_assignment->su, NULL);
 
 	while (tmp_si_assignment != NULL) {
@@ -1572,7 +1570,7 @@
 {
 	struct amf_si_assignment *si_assignment;
 
-	dprintf ("Creating SI '%s' to SU '%s' with hastate %s\n",
+	TRACE1 ("Creating SI '%s' to SU '%s' with hastate %s\n",
 		getSaNameT (&si->name), getSaNameT (&su->name),
 		amf_ha_state (ha_state));
 
diff -Naurd openais-0.91/services/amfutil.c openais-trunk/services/amfutil.c
--- openais-0.91/services/amfutil.c	2008-09-17 21:18:35.000000000 +0200
+++ openais-trunk/services/amfutil.c	2008-10-30 23:32:25.000000000 +0100
@@ -1303,7 +1303,7 @@
 
 	int i;
 
-	ENTER("'%s %s'",string, pattern);
+	ENTER();
 
 	if (regcomp(&re, pattern, REG_EXTENDED) != 0) {
 		status = 0;
@@ -1345,7 +1345,7 @@
 
 	int i;
 
-	ENTER("'%s %s'",string, pattern);
+	ENTER();
 	if (regcomp(&re, pattern, REG_EXTENDED) != 0) {
 		status = 0;
 		goto out;
@@ -1390,7 +1390,7 @@
 	int iov_cnt;
 	int res;
 
-//	ENTER ("%u, %p, %u", msg_id, buf, len);
+	ENTER ();
 
 	msg.header.size = sizeof (msg);
 	msg.header.id = SERVICE_ID_MAKE (AMF_SERVICE, msg_id);
@@ -1410,7 +1410,7 @@
 	res = api->totem_mcast (iov, iov_cnt, TOTEM_AGREED);
 
 	if (res != 0) {
-		dprintf("Unable to send %d bytes\n", msg.header.size);
+		TRACE1("Unable to send %d bytes\n", msg.header.size);
 		corosync_fatal_error (COROSYNC_FATAL_ERR);
 	}
 
diff -Naurd openais-0.91/services/Makefile openais-trunk/services/Makefile
--- openais-0.91/services/Makefile	2008-09-17 21:18:35.000000000 +0200
+++ openais-trunk/services/Makefile	2008-12-08 17:12:43.000000000 +0100
@@ -63,6 +63,8 @@
 
 ifeq (${OPENAIS_COMPAT}, DARWIN)
 
+COROSYNC_BIN=$(PREFIX)/sbin/corosync
+
 service_evs.lcrso: evs.o
 	$(CC) $(LDFLAGS) -bundle $(LDFLAGS) -bundle_loader $(COROSYNC_BIN) -bind_at_load evs.o -o $@
 


Index: openais.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openais/devel/openais.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- openais.spec	14 Oct 2008 03:55:11 -0000	1.30
+++ openais.spec	10 Dec 2008 08:10:39 -0000	1.31
@@ -1,17 +1,20 @@
+%define alphatag svn1667
+
 Name: openais
 Summary: The openais Standards-Based Cluster Framework executive and APIs
 Version: 0.91
-Release: 2%{?dist}
+Release: 3%{?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
+Patch0: openais-trunk-1667.diff
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires(post): /sbin/chkconfig
 Requires(preun): /sbin/chkconfig
-Requires: corosync
-BuildRequires: corosync-devel
+Requires: corosync >= 0.92-4
+BuildRequires: corosync-devel >= 0.92-4
 Conflicts: openais-devel <= 0.89
 
 %description 
@@ -28,6 +31,7 @@
 
 %prep
 %setup -q -n openais-%{version}
+%patch0 -p1
 
 %build
 # -O3 required for performance reasons
@@ -112,6 +116,12 @@
 %{_libdir}/openais/libSaMsg.so
 
 %changelog
+* Wed Dec 10 2008 Fabio M. Di Nitto <fdinitto at redhat.com> - 0.91-3.svn1667
+- Update to svn trunk at revision 1667 from upstream.
+- Update spec file to support alpha tag versioning.
+- Tight dependencies (both build and runtime) with corosync to avoid
+  internal ABI issues.
+
 * Mon Oct 13 2008 Dennis Gilmore <dennis at ausil.us> 0.91-2
 - remove ExclusiveArch line
 




More information about the fedora-extras-commits mailing list