From: Jakub Bogusz Date: Wed, 1 Mar 2023 17:16:24 +0000 (+0100) Subject: - updated to 1.0.1 X-Git-Tag: auto/th/sheepdog-1.0.1-1~2 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=163c9f5ed19946394a2650090c24c057a1a74422;p=packages%2Fsheepdog.git - updated to 1.0.1 - removed obsolete 32bits-targets patch --- diff --git a/32bits-targets.patch b/32bits-targets.patch deleted file mode 100644 index c498848..0000000 --- a/32bits-targets.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 1b0dafa7a6920dd2e9ce97a1c8c084e4c8fc5f68 Mon Sep 17 00:00:00 2001 -From: Alexander Evseev -Date: Wed, 29 Jul 2015 16:13:32 +0300 -Subject: [PATCH] Fix build for 32 bit targets - - * Define CPU flags for non-x86_64 targets - * Use non-SSE version of ec_encode_data for non-x86_64 targets - * Add make variable "arch" as it should be used in isa-l - -Signed-off-by: Alexander Evseev ---- - configure.ac | 1 + - include/compiler.h | 6 ++++++ - lib/Makefile.am | 14 ++++++++++++-- - lib/fec.c | 5 ++++- - 4 files changed, 23 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index e637f42..66b733b 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -199,6 +199,7 @@ LINT_FLAGS="-weak -unrecog +posixlib +ignoresigns -fcnuse \ - -badflag -D__gnuc_va_list=va_list -D__attribute\(x\)=" - - AM_CONDITIONAL(BUILD_SHA1_HW, [[[[ $host = *x86_64* ]]]]) -+AM_CONDITIONAL(X86_64, [[[[ $host = *x86_64* ]]]]) - - AC_ARG_ENABLE([fatal-warnings], - [ --enable-fatal-warnings : enable fatal warnings. ], -diff --git a/include/compiler.h b/include/compiler.h -index 3c68b75..64ab6b4 100644 ---- a/include/compiler.h -+++ b/include/compiler.h -@@ -155,6 +155,12 @@ static inline uint64_t xgetbv(uint32_t idx) - #define cpu_has_avx cpu_has(X86_FEATURE_AVX) - #define cpu_has_osxsave cpu_has(X86_FEATURE_OSXSAVE) - -+#else /* __x86_64__ */ -+ -+#define cpu_has_ssse3 0 -+#define cpu_has_avx 0 -+#define cpu_has_osxsave 0 -+ - #endif /* __x86_64__ */ - - #endif /* SD_COMPILER_H */ -diff --git a/lib/Makefile.am b/lib/Makefile.am -index dec81c7..dfb2fb0 100644 ---- a/lib/Makefile.am -+++ b/lib/Makefile.am -@@ -38,7 +38,7 @@ libsd_a_SOURCES = event.c logger.c net.c util.c rbtree.c strbuf.c \ - sha1.c option.c work.c sockfd_cache.c fec.c \ - sd_inode.c common.c - --libsheepdog_a_LIBADD = isa-l/bin/ec_base.o \ -+libsheepdog_a_LIBADD_ = isa-l/bin/ec_base.o \ - isa-l/bin/ec_highlevel_func.o \ - isa-l/bin/ec_multibinary.o \ - isa-l/bin/gf_2vect_dot_prod_sse.o \ -@@ -50,6 +50,16 @@ libsd_a_LIBADD = isa-l/bin/ec_base.o \ - isa-l/bin/gf_vect_mul_avx.o \ - isa-l/bin/gf_vect_mul_sse.o - -+libsheepdog_a_LIBADD_32 = isa-l/bin/ec_base.o \ -+ isa-l/bin/ec_highlevel_func.o \ -+ isa-l/bin/ec_multibinary.o -+ -+if !X86_64 -+arch = 32 -+endif -+ -+libsheepdog_a_LIBADD = $(libsheepdog_a_LIBADD_$(arch)) -+ - if BUILD_SHA1_HW - libsd_a_SOURCES += sha1_ssse3.S - endif -@@ -74,7 +84,7 @@ check-style: - @$(CHECK_STYLE) $(libsd_a_SOURCES) - - libisa.a: -- cd isa-l/ && $(MAKE) && cd .. -+ cd isa-l/ && $(MAKE) arch=$(arch) && cd .. - - clean-local: - rm -f *.o gmon.out *.da *.bb *.bbg -diff --git a/lib/fec.c b/lib/fec.c -index e0908bc..e2d5cd1 100644 ---- a/lib/fec.c -+++ b/lib/fec.c -@@ -739,5 +739,8 @@ void isa_decode_buffer(struct fec *ctx, uint8_t *input[], const int in_idx[], - - lost[0] = (unsigned char *)buf; - ec_init_tables(ed, 1, cm, ec_tbl); -- ec_encode_data_sse(len, ed, 1, ec_tbl, input, lost); -+ if (cpu_has_ssse3) -+ ec_encode_data_sse(len, ed, 1, ec_tbl, input, lost); -+ else -+ ec_encode_data(len, ed, 1, ec_tbl, input, lost); - } diff --git a/sheepdog.spec b/sheepdog.spec index 4df9bee..f56caa0 100644 --- a/sheepdog.spec +++ b/sheepdog.spec @@ -1,28 +1,38 @@ # TODO: # - more clusters support: -# - zookeeper (http://zookeeper.apache.org/) [-lzookeeper_mt, zookeeper.h] -# - accord (http://www.osrg.net/accord/ - available on github, no releases yet) [libacrd.pc] -# - http request service (--enable-http)? -# - nfs server service (--enable-nfs)? +# - zookeeper (--enable-zookeeper) [http://zookeeper.apache.org/, -lzookeeper_mt, zookeeper.h] +# - shepherd (--enable-shepherd) +# - http request service (--enable-http, BR: curl-devel, fcgi-devel)? +# - nfs server service (--enable-nfs, BR: libtirpc-devel)? +# - diskvnodes (--enable-diskvnodes)? +# - earthquake debugger (--enable-earthquake)? +# - lttng tracing (--enable-lttng-ust, BR: lttng-ust-devel)? +# - accelio (--enable-accelio, BR: accelio-devel) # - PLDify and register init script Summary: Sheepdog - distributed storage system for QEMU/KVM Summary(pl.UTF-8): Sheepdog - rozproszony system przechowywania danych dla QEMU/KVM Name: sheepdog -Version: 0.9.2 +Version: 1.0.1 Release: 1 License: GPL v2 Group: Applications/System +#Source0Download: https://github.com/sheepdog/sheepdog/tags Source0: https://github.com/collie/sheepdog/archive/v%{version}/%{name}-%{version}.tar.gz -# Source0-md5: b02eadf70b9cea6e05b5887d193941bf -Patch0: 32bits-targets.patch +# Source0-md5: 0f7f865ceefc07a88dfec5c2f1912e32 URL: http://www.osrg.net/sheepdog/ BuildRequires: autoconf >= 2.61 BuildRequires: automake -BuildRequires: corosync-devel +BuildRequires: corosync-devel >= 2 BuildRequires: groff BuildRequires: libfuse-devel >= 2.8.0 +BuildRequires: libqb-devel +BuildRequires: libtool >= 2:2 BuildRequires: pkgconfig +BuildRequires: systemd-devel >= 1:209 BuildRequires: userspace-rcu-devel >= 0.6.0 +%ifarch %{x8664} +BuildRequires: yasm >= 1.2.0 +%endif Requires: libfuse >= 2.8.0 Requires: userspace-rcu >= 0.6.0 ExclusiveArch: %{ix86} %{x8664} @@ -57,17 +67,53 @@ bash-completion for sheepdog dog command. %description -n bash-completion-%{name} -l pl.UTF-8 Bashowe dopełnianie składni dla polecenia dog z pakietu sheepdog. +%package libs +Summary: sheepdog shared library +Summary(pl.UTF-8): Biblioteka współdzielona sheepdog +Group: Libraries + +%description libs +sheepdog shared library. + +%description libs -l pl.UTF-8 +Biblioteka współdzielona sheepdog. + +%package devel +Summary: Header files for sheepdog library +Summary(pl.UTF-8): Pliki nagłówkowe biblioteki sheepdog +Group: Development/Libraries +Requires: %{name}-libs = %{version}-%{release} + +%description devel +Header files for sheepdog library. + +%description devel -l pl.UTF-8 +Pliki nagłówkowe biblioteki sheepdog. + +%package static +Summary: Static sheepdog library +Summary(pl.UTF-8): Biblioteka statyczna sheepdog +Group: Development/Libraries +Requires: %{name}-devel = %{version}-%{release} + +%description static +Static sheepdog library. + +%description static -l pl.UTF-8 +Biblioteka statyczna sheepdog. + %prep %setup -q -%patch0 -p1 %build +%{__libtoolize} %{__aclocal} %{__autoconf} %{__autoheader} %{__automake} %configure \ --disable-silent-rules \ + --enable-systemd \ --with-initddir=/etc/rc.d/init.d \ --with-systemdsystemunitdir=%{systemdunitdir} %{__make} @@ -78,13 +124,15 @@ rm -rf $RPM_BUILD_ROOT %{__make} install \ DESTDIR=$RPM_BUILD_ROOT +%{__rm} $RPM_BUILD_ROOT%{_libdir}/libsheepdog.la + %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc COPYING README INSTALL -%attr(755,root,root) %{_sbindir}/dog +%attr(755,root,root) %{_bindir}/dog %attr(755,root,root) %{_sbindir}/sheep %attr(755,root,root) %{_sbindir}/sheepfs %attr(755,root,root) %{_sbindir}/shepherd @@ -98,3 +146,15 @@ rm -rf $RPM_BUILD_ROOT %files -n bash-completion-%{name} %defattr(644,root,root,755) /etc/bash_completion.d/dog + +%files libs +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/libsheepdog.so + +%files devel +%defattr(644,root,root,755) +%{_includedir}/sheepdog + +%files static +%defattr(644,root,root,755) +%{_libdir}/libsheepdog.a