rebuild for corosync soname change and apply patch to port to new

headers

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
This commit is contained in:
Fabio M. Di Nitto 2012-03-16 11:21:58 +01:00
parent b38cd21978
commit 8869f4dc4f
2 changed files with 68 additions and 1 deletions

View File

@ -1,13 +1,14 @@
Name: sheepdog
Summary: The Sheepdog Distributed Storage System for KVM/QEMU
Version: 0.3.0
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2 and GPLv2+
Group: System Environment/Base
URL: http://www.osrg.net/sheepdog
Source0: collie-sheepdog-v0.3.0-0-gbb41896.tar.gz
#get source from github here https://github.com/collie/sheepdog/tarball/v0.3.0
Source1: sheepdog.service
Patch0: update_cpg_to_cs_defines.patch
# Runtime bits
Requires: corosync
@ -38,6 +39,7 @@ a distributed object storage system for KVM.
%prep
%setup -qn collie-sheepdog-bb41896
%patch0 -p1
%build
./autogen.sh
@ -92,6 +94,10 @@ fi
%{_mandir}/man8/sheep.8*
%changelog
* Fri Mar 16 2012 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.3.0-2
- Rebuild against new corosync (soname change).
- Add patch to fix build against new corosync headers.
* Wed Jan 15 2012 David Nalley <david@gnsa.us> - 0.3.0-1
- updating to 0.3.0

View File

@ -0,0 +1,61 @@
diff -Naurd collie-sheepdog-bb41896.orig/sheep/cluster/corosync.c collie-sheepdog-bb41896/sheep/cluster/corosync.c
--- collie-sheepdog-bb41896.orig/sheep/cluster/corosync.c 2011-12-28 18:03:36.000000000 +0100
+++ collie-sheepdog-bb41896/sheep/cluster/corosync.c 2012-03-16 10:47:39.378340300 +0100
@@ -196,9 +196,9 @@
retry:
ret = cpg_mcast_joined(cpg_handle, CPG_TYPE_AGREED, iov, iov_cnt);
switch (ret) {
- case CPG_OK:
+ case CS_OK:
break;
- case CPG_ERR_TRY_AGAIN:
+ case CS_ERR_TRY_AGAIN:
dprintf("failed to send message: retrying\n");
sleep(1);
goto retry;
@@ -632,7 +632,7 @@
corosync_handlers = *handlers;
ret = cpg_initialize(&cpg_handle, &cb);
- if (ret != CPG_OK) {
+ if (ret != CS_OK) {
eprintf("failed to initialize cpg (%d) - is corosync running?\n", ret);
return -1;
}
@@ -659,7 +659,7 @@
this_node.pid = getpid();
ret = cpg_fd_get(cpg_handle, &fd);
- if (ret != CPG_OK) {
+ if (ret != CS_OK) {
eprintf("failed to get cpg file descriptor (%d)\n", ret);
return -1;
}
@@ -681,13 +681,13 @@
retry:
ret = cpg_join(cpg_handle, &cpg_group);
switch (ret) {
- case CPG_OK:
+ case CS_OK:
break;
- case CPG_ERR_TRY_AGAIN:
+ case CS_ERR_TRY_AGAIN:
dprintf("failed to join the sheepdog group: retrying\n");
sleep(1);
goto retry;
- case CPG_ERR_SECURITY:
+ case CS_ERR_SECURITY:
eprintf("permission denied to join the sheepdog group\n");
return -1;
default:
@@ -740,8 +740,8 @@
{
int ret;
- ret = cpg_dispatch(cpg_handle, CPG_DISPATCH_ALL);
- if (ret != CPG_OK)
+ ret = cpg_dispatch(cpg_handle, CS_DISPATCH_ALL);
+ if (ret != CS_OK)
return -1;
return 0;