From 58f2cc157472b117353746b4509fac81bb334991 Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Sep 08 2021 17:04:49 +0000 Subject: Import ck-0.7.0-5.el9 in CloudSIG xena --- diff --git a/.ck.metadata b/.ck.metadata new file mode 100644 index 0000000..7a79dc8 --- /dev/null +++ b/.ck.metadata @@ -0,0 +1 @@ +9eff8e1677303a0714f0b706a76885703d8eac73 SOURCES/0.7.0.tar.gz diff --git a/SOURCES/ck-nogettid.patch b/SOURCES/ck-nogettid.patch new file mode 100644 index 0000000..0935a1f --- /dev/null +++ b/SOURCES/ck-nogettid.patch @@ -0,0 +1,21 @@ +Static function gettid makes troubles when compiling tests, +because the extern declaration exists. +This might not be the best way to fix this, but it makes the tests succeed. + +diff -up ck-0.6.0/regressions/common.h.nogettid ck-0.6.0/regressions/common.h +--- ck-0.6.0/regressions/common.h.nogettid 2019-08-21 08:10:51.593209466 +0200 ++++ ck-0.6.0/regressions/common.h 2019-08-21 08:11:05.320341728 +0200 +@@ -267,13 +267,6 @@ struct affinity { + #define AFFINITY_INITIALIZER {0, 0} + + #ifdef __linux__ +-#ifndef gettid +-static pid_t +-gettid(void) +-{ +- return syscall(__NR_gettid); +-} +-#endif /* gettid */ + + CK_CC_UNUSED static int + aff_iterate(struct affinity *acb) diff --git a/SOURCES/ck-register-constraint.patch b/SOURCES/ck-register-constraint.patch new file mode 100644 index 0000000..fe5ea99 --- /dev/null +++ b/SOURCES/ck-register-constraint.patch @@ -0,0 +1,33 @@ +commit b02bb2b805c970e6ef90e8e15daafa5d78cb195f +Author: Paul Khuong +Date: Wed Aug 21 10:08:10 2019 -0400 + + x86/ck_pr: fix register constraint for ck_pr_foo_is_zero + + setcc works with byte registers, so we want `q` to ensure + the low byte register is encodable, not the general `r`. + + Fixes https://github.com/concurrencykit/ck/issues/142. + +diff --git a/include/gcc/x86/ck_pr.h b/include/gcc/x86/ck_pr.h +index e678e83..8ef8864 100644 +--- a/include/gcc/x86/ck_pr.h ++++ b/include/gcc/x86/ck_pr.h +@@ -239,7 +239,7 @@ CK_PR_FAA_S(8, uint8_t, "xaddb") + bool ret; \ + __asm__ __volatile__(CK_PR_LOCK_PREFIX I " %0; setz %1" \ + : "+m" (*(C *)target), \ +- "=rm" (ret) \ ++ "=qm" (ret) \ + : \ + : "memory", "cc"); \ + return ret; \ +@@ -354,7 +354,7 @@ CK_PR_CAS_S(8, uint8_t, "cmpxchgb") + : "q" (set), \ + "a" (compare) \ + : "memory", "cc"); \ +- return (bool)z; \ ++ return z; \ + } + + CK_PR_CAS_O(ptr, void, void *, char, "l", "eax") diff --git a/SOURCES/ck_disable_ck_hclh_test.patch b/SOURCES/ck_disable_ck_hclh_test.patch new file mode 100644 index 0000000..d3bd174 --- /dev/null +++ b/SOURCES/ck_disable_ck_hclh_test.patch @@ -0,0 +1,38 @@ +Author: Filip Januš +Date: 17.2.2020 +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1799226 +Github issue: https://github.com/concurrencykit/ck/issues/153 + +Build fails on arm due to test ck_hclh.Test fails only with 5 cores +This is temporary fix until upstream find solution + +diff -ur ck-0.7.0/regressions/ck_spinlock/validate/Makefile ck-0.7.0_patch/regressions/ck_spinlock/validate/Makefile +--- ck-0.7.0/regressions/ck_spinlock/validate/Makefile 2019-02-20 21:13:02.000000000 +0100 ++++ ck-0.7.0_patch/regressions/ck_spinlock/validate/Makefile 2020-02-17 14:37:03.250804089 +0100 +@@ -1,7 +1,7 @@ + .PHONY: check clean + + all: ck_ticket ck_mcs ck_dec ck_cas ck_fas ck_clh linux_spinlock \ +- ck_ticket_pb ck_anderson ck_spinlock ck_hclh ++ ck_ticket_pb ck_anderson ck_spinlock + + check: all + ./ck_ticket $(CORES) 1 +@@ -10,7 +10,6 @@ + ./ck_cas $(CORES) 1 + ./ck_fas $(CORES) 1 + ./ck_clh $(CORES) 1 +- ./ck_hclh $(CORES) 1 + ./linux_spinlock $(CORES) 1 + ./ck_ticket_pb $(CORES) 1 + ./ck_anderson $(CORES) 1 +@@ -28,9 +27,6 @@ + ck_clh: ck_clh.c + $(CC) $(CFLAGS) -o ck_clh ck_clh.c + +-ck_hclh: ck_hclh.c +- $(CC) $(CFLAGS) -o ck_hclh ck_hclh.c +- + ck_anderson: ck_anderson.c + $(CC) $(CFLAGS) -o ck_anderson ck_anderson.c + diff --git a/SPECS/ck.spec b/SPECS/ck.spec new file mode 100644 index 0000000..a72e874 --- /dev/null +++ b/SPECS/ck.spec @@ -0,0 +1,141 @@ +Name: ck +Version: 0.7.0 +Release: 5%{?dist} +Summary: Library for high performance concurrent programming + +License: BSD +URL: http://concurrencykit.org + +Source: https://github.com/concurrencykit/ck/archive/refs/tags/%{version}.tar.gz +Patch1: ck-nogettid.patch +Patch2: ck-register-constraint.patch +# disable ck_hclh_test from ck_spinlock temporary solution +# github issue: https://github.com/concurrencykit/ck/issues/153 +Patch3: ck_disable_ck_hclh_test.patch + +BuildRequires: gcc +BuildRequires: make + +%description +Concurrency Kit provides a plethora of concurrency primitives, safe memory +reclamation mechanisms and lock-less and lock-free data structures designed to +aid in the design and implementation of high performance concurrent systems. It +is designed to minimize dependencies on operating system-specific interfaces +and most of the interface relies only on a strict subset of the standard +library and more popular compiler extensions. + +%package devel +Summary: Header files and libraries for CK development +Requires: %{name} = %{version}-%{release} + +%description devel +Concurrency Kit provides a plethora of concurrency primitives, safe memory +reclamation mechanisms and lock-less and lock-free data structures designed to +aid in the design and implementation of high performance concurrent systems. It +is designed to minimize dependencies on operating system-specific interfaces +and most of the interface relies only on a strict subset of the standard +library and more popular compiler extensions. + +This package provides the libraries, include files, and other +resources needed for developing Concurrency Kit applications. + +%prep +%setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 + +%build +export CFLAGS="%{optflags}" +./configure \ + --libdir=%{_libdir} \ + --includedir=%{_includedir}/%{name} \ + --mandir=%{_mandir} \ + --prefix=%{_prefix} +%make_build + +%install +%make_install + +# fix weird mode of the shared library +chmod 0755 %{buildroot}%{_libdir}/libck.so.* + +# remove static library +rm %{buildroot}%{_libdir}/libck.a + +%check +make check + +%files +%license LICENSE +%{_libdir}/libck.so.* + +%files devel +%{_libdir}/libck.so +%{_includedir}/%{name} +%{_libdir}/pkgconfig/%{name}.pc +%{_mandir}/man3/*.3.gz + +%changelog +* Tue Jan 26 2021 Fedora Release Engineering - 0.7.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 0.7.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Feb 17 2020 Filip Januš - 0.7.0-3 +- Build fails due to ck_hclh test +- github issue: https://github.com/concurrencykit/ck/issues/153 +- resolves:https://bugzilla.redhat.com/show_bug.cgi?id=1799226 +- add patch - disables ck_hclh test + +* Tue Jan 28 2020 Fedora Release Engineering - 0.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Aug 22 2019 Honza Horak - 0.7.0-1 +- Update to 0.7.0 + +* Wed Aug 21 2019 Honza Horak - 0.6.0-11 +- Add upstream patch ck_barrier_combining: switch to seq_cst semantics to make + ppc64le + +* Wed Aug 21 2019 Honza Horak - 0.6.0-10 +- Remove static gettid definition + +* Wed Jul 24 2019 Fedora Release Engineering - 0.6.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 0.6.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Tue Jul 17 2018 Honza Horak - 0.6.0-7 +- Explicitly include gcc + +* Tue Jul 17 2018 Honza Horak - 0.6.0-6 +- Fix building on s390x and ignore tests also for ppc64le and ix86 and x86_64 + +* Thu Jul 12 2018 Fedora Release Engineering - 0.6.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 0.6.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 0.6.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue Feb 28 2017 Xavier Bachelot - 0.6.0-1 +- Update to 0.6.0. +- Run test suite. + +* Sat Feb 11 2017 Honza Horak - 0.5.2-2 +- Fix issues found during Package Review + Summary provides better idea what this library is for + Using macros for make build and install + Fix permissions of the shared library + +* Sat Feb 04 2017 Honza Horak - 0.5.2-1 +- Initial packaging +