diff --git a/coroutine-stack-size.patch b/coroutine-stack-size.patch new file mode 100644 index 0000000..11e2c74 --- /dev/null +++ b/coroutine-stack-size.patch @@ -0,0 +1,15 @@ +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; diff --git a/sha1-extern.patch b/sha1-extern.patch deleted file mode 100644 index 388793c..0000000 --- a/sha1-extern.patch +++ /dev/null @@ -1,17 +0,0 @@ -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); diff --git a/sheepdog.spec b/sheepdog.spec index bec8630..71793f2 100644 --- a/sheepdog.spec +++ b/sheepdog.spec @@ -1,21 +1,18 @@ Name: sheepdog Summary: The Sheepdog distributed storage system for KVM/QEMU Version: 1.0.1 -Release: 27%{?dist} -# Automatically converted from old format: GPLv2 and GPLv2+ - review is highly recommended. -License: GPL-2.0-only AND GPL-2.0-or-later +Release: 6%{?dist} +License: GPLv2 and GPLv2+ +Group: System Environment/Base URL: http://sheepdog.github.io/sheepdog Source0: https://github.com/sheepdog/sheepdog/archive/v1.0.1.tar.gz Source1: sheepdog.service Source2: sheepdog.timer Source3: sheepdog -Patch0: sha1-extern.patch - %{?systemd_requires} # Build bits -BuildRequires: make BuildRequires: autoconf automake libtool systemd BuildRequires: corosync corosynclib corosynclib-devel BuildRequires: userspace-rcu-devel @@ -41,8 +38,8 @@ which offer a distributed object storage system for KVM. %package devel Summary: Header files for the Sheepdog distributed storage system -# Automatically converted from old format: GPLv2 and GPLv2+ - review is highly recommended. -License: GPL-2.0-only AND GPL-2.0-or-later +Group: Development/Libraries +License: GPLv2 and GPLv2+ Requires: %{name}-libs%{?_isa} = %{version}-%{release} %description devel @@ -50,18 +47,14 @@ This package contains the header files for libsheepdog. %package libs Summary: Libraries for the Sheepdog distributed storage system -# Automatically converted from old format: GPLv2 and GPLv2+ - review is highly recommended. -License: GPL-2.0-only AND GPL-2.0-or-later +Group: Applications/File +License: GPLv2 and GPLv2+ %description libs This package contains the libsheepdog shared library. %prep %setup -q -%patch -P0 -p1 - -# urcu/compiler.h from userspace-rcu-devel requires __STDC_VERSION__ 201112L -sed -r -i 's/-std=gnu99/-std=gnu23/' configure.ac %build ./autogen.sh @@ -98,6 +91,7 @@ cp -a %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig %systemd_postun_with_restart sheepdog.timer %files +%defattr(-,root,root,-) %doc COPYING README %{_bindir}/dog %{_sbindir}/sheep @@ -126,71 +120,6 @@ cp -a %{SOURCE3} %{buildroot}/%{_sysconfdir}/sysconfig %{_libdir}/libsheepdog.so %changelog -* Fri Jul 17 2026 Fedora Release Engineering - 1.0.1-27 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Sat Jan 17 2026 Fedora Release Engineering - 1.0.1-26 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Fri Jul 25 2025 Fedora Release Engineering - 1.0.1-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sun Jan 19 2025 Fedora Release Engineering - 1.0.1-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Aug 07 2024 Miroslav Suchý - 1.0.1-23 -- convert license to SPDX - -* Sat Jul 20 2024 Fedora Release Engineering - 1.0.1-22 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Sat Jan 27 2024 Fedora Release Engineering - 1.0.1-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jul 22 2023 Fedora Release Engineering - 1.0.1-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Sat Jan 21 2023 Fedora Release Engineering - 1.0.1-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jul 23 2022 Fedora Release Engineering - 1.0.1-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Sat Jan 22 2022 Fedora Release Engineering - 1.0.1-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 1.0.1-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 1.0.1-15 -- Rebuilt for updated systemd-rpm-macros - See https://pagure.io/fesco/issue/2583. - -* Wed Jan 27 2021 Fedora Release Engineering - 1.0.1-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 1.0.1-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Mar 30 2020 Paolo Bonzini - 1.0.1-12 -- New patch sha1-extern.patch to fix FTBFS -- Delete obsolete patches - -* Thu Jan 30 2020 Fedora Release Engineering - 1.0.1-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Fri Jul 26 2019 Fedora Release Engineering - 1.0.1-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sat Feb 02 2019 Fedora Release Engineering - 1.0.1-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jul 14 2018 Fedora Release Engineering - 1.0.1-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Thu Mar 22 2018 Kevin Fenzi - 1.0.1-7 -- Rebuild for new corosync. Fixes bug #1559672 - * Fri Feb 09 2018 Fedora Release Engineering - 1.0.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/update_cpg_to_cs_defines.patch b/update_cpg_to_cs_defines.patch new file mode 100644 index 0000000..d610f46 --- /dev/null +++ b/update_cpg_to_cs_defines.patch @@ -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;