New patch sha1-extern.patch to fix FTBFS

This commit is contained in:
Paolo Bonzini 2020-03-30 13:33:00 +02:00
parent 8d54b4be55
commit ff3a31b760
4 changed files with 25 additions and 77 deletions

View File

@ -1,15 +0,0 @@
cpg_dispatch requires 0x101568 bytes of stack.
diff --git a/lib/coroutine.c b/lib/coroutine.c
index 5b2ed79..1e1060c 100644
--- a/lib/coroutine.c
+++ b/lib/coroutine.c
@@ -52,7 +52,7 @@ enum co_action {
#define POOL_MAX_SIZE 64
#endif
-#define STACK_MAX_SIZE (1 << 20) /* 1 MB */
+#define STACK_MAX_SIZE (2 << 20) /* 1 MB */
struct coroutine {
coroutine_entry_func_t *entry;

17
sha1-extern.patch Normal file
View File

@ -0,0 +1,17 @@
diff --git a/include/sha1.h b/include/sha1.h
index e026998..bd45181 100644
--- a/include/sha1.h
+++ b/include/sha1.h
@@ -27,9 +27,9 @@ typedef void (*sha1_init_func_t)(void *);
typedef void (*sha1_update_func_t)(void *, const uint8_t *, unsigned int);
typedef void (*sha1_final_func_t)(void *, uint8_t *);
-sha1_init_func_t sha1_init;
-sha1_update_func_t sha1_update;
-sha1_final_func_t sha1_final;
+extern sha1_init_func_t sha1_init;
+extern sha1_update_func_t sha1_update;
+extern sha1_final_func_t sha1_final;
const char *sha1_to_hex(const unsigned char *sha1);
void get_buffer_sha1(unsigned char *buf, unsigned len, unsigned char *sha1);

View File

@ -1,7 +1,7 @@
Name: sheepdog
Summary: The Sheepdog distributed storage system for KVM/QEMU
Version: 1.0.1
Release: 11%{?dist}
Release: 12%{?dist}
License: GPLv2 and GPLv2+
URL: http://sheepdog.github.io/sheepdog
Source0: https://github.com/sheepdog/sheepdog/archive/v1.0.1.tar.gz
@ -9,6 +9,8 @@ Source1: sheepdog.service
Source2: sheepdog.timer
Source3: sheepdog
Patch0: sha1-extern.patch
%{?systemd_requires}
# Build bits
@ -52,6 +54,7 @@ This package contains the libsheepdog shared library.
%prep
%setup -q
%patch0 -p1
%build
./autogen.sh
@ -116,6 +119,10 @@ cp -a %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig
%{_libdir}/libsheepdog.so
%changelog
* Mon Mar 30 2020 Paolo Bonzini <pbonzini@redhat.com> - 1.0.1-12
- New patch sha1-extern.patch to fix FTBFS
- Delete obsolete patches
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

View File

@ -1,61 +0,0 @@
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;