Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
This commit is contained in:
Muhammad Falak R Wani 2024-04-19 14:35:07 +05:30 коммит произвёл GitHub
Родитель 7198569a3d
Коммит 5202c60acd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
10 изменённых файлов: 403 добавлений и 27 удалений

2
LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md сгенерированный

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -117,6 +117,7 @@
"cim-schema",
"cjkuni-uming-fonts",
"cjose",
"ck",
"cldr-emoji-annotation",
"clucene",
"clutter",

Просмотреть файл

@ -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)

Просмотреть файл

@ -0,0 +1,33 @@
commit b02bb2b805c970e6ef90e8e15daafa5d78cb195f
Author: Paul Khuong <pvk@google.com>
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")

Просмотреть файл

@ -0,0 +1,38 @@
From baf41283f37caa9086f55455bd0b1b5b47df384f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Fri, 17 Feb 2023 00:32:42 +0100
Subject: [PATCH] Allow different limit for ck_sequence validation
This test takes significantly longer when it does not receive all CPUs
on the platform. It takes significantly longer on ppc64le and aarch64
platform when CORES is less than actually detected.
Allow overriding just this test by CORES_SEQUENCE variable.
---
regressions/ck_sequence/validate/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/regressions/ck_sequence/validate/Makefile b/regressions/ck_sequence/validate/Makefile
index bc2e5be..2aeb32b 100644
--- a/regressions/ck_sequence/validate/Makefile
+++ b/regressions/ck_sequence/validate/Makefile
@@ -1,6 +1,7 @@
.PHONY: check clean distribution
OBJECTS=ck_sequence
+SEQUENCE_CORES=$(CORES)
all: $(OBJECTS)
@@ -8,7 +9,7 @@ ck_sequence: ck_sequence.c ../../../include/ck_sequence.h
$(CC) $(CFLAGS) -o ck_sequence ck_sequence.c
check: all
- ./ck_sequence $(CORES) 1
+ ./ck_sequence $(SEQUENCE_CORES) 1
clean:
rm -rf *~ *.o $(OBJECTS) *.dSYM *.exe
--
2.39.1

Просмотреть файл

@ -0,0 +1,33 @@
From 6a8303c5a8d6c887df50ca8668bd4163c18bb720 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Fri, 17 Feb 2023 00:00:17 +0100
Subject: [PATCH] Report times for each unit test
---
regressions/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/regressions/Makefile b/regressions/Makefile
index c74b4fa..8e21d46 100644
--- a/regressions/Makefile
+++ b/regressions/Makefile
@@ -24,6 +24,7 @@ DIR=array \
stack \
swlock \
tflock
+TIME=time
.PHONY: all clean check
@@ -129,7 +130,7 @@ check: all
rc=0; \
for d in $(DIR) ; do \
echo "----[ Testing $$d...."; \
- $(MAKE) -C ./ck_$$d/validate check || rc=1; \
+ $(TIME) $(MAKE) -C ./ck_$$d/validate check || rc=1; \
echo; \
done; \
exit $$rc
--
2.39.1

Просмотреть файл

@ -0,0 +1,5 @@
{
"Signatures": {
"ck-0.7.2.tar.gz": "568ebe0bc1988a23843fce6426602e555b7840bf6714edcdf0ed530214977f1b"
}
}

197
SPECS/ck/ck.spec Normal file
Просмотреть файл

@ -0,0 +1,197 @@
Summary: Library for high performance concurrent programming
Name: ck
Version: 0.7.2
Release: 1%{?dist}
License: BSD-2-clause AND Apache-2.0 AND BSD-3-clause
Vendor: Microsoft Corporation
Distribution: Azure Linux
URL: https://github.com/concurrencykit/ck
Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
# 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
# measure unit test times
Patch4: ck-unit-time.patch
# specify SEQUENCE_CORES different for one test
Patch5: ck-unit-sequence.patch
BuildRequires: gcc
BuildRequires: make
BuildRequires: sed
%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
%autosetup -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
MAX_CORES=4
# 8+ CORES take quite long, limit them to 4
CORES=$(grep '^CORES=' build/regressions.build | cut -d= -f2)
# ck_sequence tests wants all cores on the system to be quick
SEQUENCE_CORES="$CORES"
TIMEOUT=$((30*60))
TIMEOUT_KILL=$((TIMEOUT+100))
[ "${CORES}" -gt "${MAX_CORES}" ] && CORES="${MAX_CORES}"
%ifarch %{power64}
# It hangs often on this test for some reason
sed -e '/^OBJECTS=/ s, barrier_mcs,,' -i regressions/ck_barrier/validate/Makefile
%endif
%ifarch %{arm32} %{arm64}
# Some tests take quite long on ARMs. Skip them
sed -e '/^\s*brlock\s/ d' -e '/^\s*cohort\s/ d' -e '/^\s*rwlock\s/ d' \
-i regressions/Makefile
%endif
# Protect builders against hard lock
time timeout -k $TIMEOUT_KILL $TIMEOUT \
make check CORES=${CORES} SEQUENCE_CORES=${SEQUENCE_CORES}
%files
%license LICENSE
%{_libdir}/libck.so.*
%files devel
%{_libdir}/libck.so
%{_includedir}/%{name}
%{_libdir}/pkgconfig/%{name}.pc
%{_mandir}/man3/*.3.gz
%changelog
* Wed Apr 17 2024 Muhammad Falak <mwani@microsoft.com> - 0.7.2-1
- Initial Azure Linux import from Fedora 40 (license: MIT)
- License Verified
* Tue Jan 23 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jul 13 2023 Petr Menšík <pemensik@redhat.com> - 0.7.1-2
- Use SPDX licenses
* Wed Jul 12 2023 Paul Wouters <paul.wouters@aiven.io - 0.7.1-1
- Updated to 0.7.1 (partially for testing resolving of rhbz#2113147)
- Remove upstreamed patches
- Updated URL: and Source: to github, as concurrencykit.org has been dead for a while
* Fri Feb 17 2023 Petr Menšík <pemensik@redhat.com> - 0.7.0-10
- Set time limit to unit test run
- Limit unit test to less cores to make them faster
- Skip some tests on ppc64le and aarch64 platforms to avoid failures
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Feb 17 2020 Filip Januš <fjanus@redhat.com> - 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 <releng@fedoraproject.org> - 0.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Aug 22 2019 Honza Horak <hhorak@redhat.com> - 0.7.0-1
- Update to 0.7.0
* Wed Aug 21 2019 Honza Horak <hhorak@redhat.com> - 0.6.0-11
- Add upstream patch ck_barrier_combining: switch to seq_cst semantics to make
ppc64le
* Wed Aug 21 2019 Honza Horak <hhorak@redhat.com> - 0.6.0-10
- Remove static gettid definition
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 0.6.0-7
- Explicitly include gcc
* Tue Jul 17 2018 Honza Horak <hhorak@redhat.com> - 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 <releng@fedoraproject.org> - 0.6.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Feb 28 2017 Xavier Bachelot <xavier@bachelot.org> - 0.6.0-1
- Update to 0.6.0.
- Run test suite.
* Sat Feb 11 2017 Honza Horak <hhorak@redhat.com> - 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 <hhorak@redhat.com> - 0.5.2-1
- Initial packaging

Просмотреть файл

@ -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

Просмотреть файл

@ -1732,6 +1732,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "ck",
"version": "0.7.2",
"downloadUrl": "https://github.com/concurrencykit/ck/archive/0.7.2/ck-0.7.2.tar.gz"
}
}
},
{
"component": {
"type": "other",
@ -11156,16 +11166,6 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "libtracecmd",
"version": "1.5.1",
"downloadUrl": "https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-libtracecmd-1.5.1.tar.gz"
}
}
},
{
"component": {
"type": "other",
@ -11176,16 +11176,6 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "libtracefs",
"version": "1.8.0",
"downloadUrl": "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-1.8.0.tar.gz"
}
}
},
{
"component": {
"type": "other",
@ -11236,6 +11226,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "libtracecmd",
"version": "1.5.1",
"downloadUrl": "https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-libtracecmd-1.5.1.tar.gz"
}
}
},
{
"component": {
"type": "other",
@ -11246,6 +11246,16 @@
}
}
},
{
"component": {
"type": "other",
"other": {
"name": "libtracefs",
"version": "1.8.0",
"downloadUrl": "https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/snapshot/libtracefs-1.8.0.tar.gz"
}
}
},
{
"component": {
"type": "other",
@ -23062,9 +23072,9 @@
"component": {
"type": "other",
"other": {
"name": "python-mdurl",
"version": "0.1.2",
"downloadUrl": "https://github.com/executablebooks/mdurl/archive/0.1.2/mdurl-0.1.2.tar.gz"
"name": "python-mccabe",
"version": "0.6.1",
"downloadUrl": "https://files.pythonhosted.org/packages/source/m/mccabe/mccabe-0.6.1.tar.gz"
}
}
},
@ -23072,9 +23082,9 @@
"component": {
"type": "other",
"other": {
"name": "python-mccabe",
"version": "0.6.1",
"downloadUrl": "https://files.pythonhosted.org/packages/source/m/mccabe/mccabe-0.6.1.tar.gz"
"name": "python-mdurl",
"version": "0.1.2",
"downloadUrl": "https://github.com/executablebooks/mdurl/archive/0.1.2/mdurl-0.1.2.tar.gz"
}
}
},