From 5a7ec214df64b7ade93927cd3eb267582170122f Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Wed, 16 Dec 2020 21:25:16 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/libcxl.git#bb74394e77ff9235991be992aba4691d3ed22ff5 --- .gitignore | 2 + libcxl.spec | 147 +++++++++++++++++++++++ libcxl_create_soname_link.patch | 51 ++++++++ libcxl_sysmacros.patch | 32 +++++ remove_2_backslashes_in_shell_call.patch | 28 +++++ sources | 1 + 6 files changed, 261 insertions(+) create mode 100644 libcxl.spec create mode 100644 libcxl_create_soname_link.patch create mode 100644 libcxl_sysmacros.patch create mode 100644 remove_2_backslashes_in_shell_call.patch create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..4fbbf9e 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/v1.4.tar.gz +/v1.7.tar.gz diff --git a/libcxl.spec b/libcxl.spec new file mode 100644 index 0000000..9f0ce41 --- /dev/null +++ b/libcxl.spec @@ -0,0 +1,147 @@ +%global soversion 1 + +Name: libcxl +Version: 1.7 +Release: 7%{?dist} +Summary: Coherent accelerator interface +License: ASL 2.0 +URL: https://github.com/ibm-capi/libcxl +Source0: https://github.com/ibm-capi/libcxl/archive/v%{version}.tar.gz +Patch1: remove_2_backslashes_in_shell_call.patch +ExclusiveArch: %{power64} +BuildRequires: gcc + +%description +The coherent accelerator interface is designed to allow the coherent +connection of accelerators (FPGAs and other devices) to a POWER system. +Coherent in this context means that the accelerator and CPUs can both access +system memory directly and with the same effective addresses. IBM refers to +this as the Coherent Accelerator Processor Interface (CAPI). In the Linux +world it is referred to by the name CXL to avoid confusion with the ISDN +CAPI subsystem. + +%package devel +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The %{name}-devel package contains header file and man pages for +developing applications that use %{name}. + + +%prep +%setup -q +%patch1 -p1 + +%build +LDFLAGS="%{__global_ldflags}" CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" make %{?_smp_mflags} V=1 +mkdir -p build/man3 +cp -p man3/*.3 build/man3 + +%install +make DESTDIR=%{buildroot} prefix=/usr install +mkdir -p $RPM_BUILD_ROOT%{_mandir} +cp -a build/man3 $RPM_BUILD_ROOT%{_mandir}/ + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%license LICENSE +%doc README.md +%{_libdir}/libcxl.so.* + +%files devel +%{_includedir}/* +%{_mandir}/man3/* +%{_libdir}/libcxl.so + +%changelog +* Tue Jul 28 2020 Fedora Release Engineering - 1.7-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jun 24 2020 Michel Normand 1.7-6 + Add remove_2_backslashes_in_shell_call.patch + to avoid rawhide build failure. + +* Wed Jan 29 2020 Fedora Release Engineering - 1.7-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Jul 25 2019 Fedora Release Engineering - 1.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 1.7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 1.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu May 17 2018 Michel Normand 1.7-1 +- Update v1.7 + New api cxl_get_tunneled_ops_supported +- Update v1.6 + new functions cxl_afu_host_thread_wait(), cxl_work_disable_wait(), + cxl_work_enable_wait() and cxl_work_get_tid() are now unconditionally + built and exported. +- remove libcxl_sysmacros.patch embeded upstream. + +* Thu Mar 08 2018 Than Ngo - 1.5-4 +- fixed bz#1552648 - libcxl: Incomplete Fedora build flags injection + +* Wed Feb 07 2018 Fedora Release Engineering - 1.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.5-1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Jun 8 2017 Michel Normand 1.5-0 +- Update v1.5 + * libcxl: Check afu link when read from PSA mmio return all FFs + * Makefile: add -Werror + * Use _DEFAULT_SOURCE rather than _BSD_SOURCE + * Fix sparse warnings + * Added #include + * Man pages: document flags CXL_MMIO_{BIG,HOST,LITTLE}_ENDIAN + * Makefile: do not fail if target symlink already exists. + * Man pages: clarify mmio read/write alignment constraints. + * Create LIBSONAME link + * sysfs: Fix a boundary condition check for OUT_OF_RANGE macro +- remove libcxl_create_soname_link.patch part of above update. +- add libcxl_sysmacros.patch to avoid warning at build time + +* Fri Jun 10 2016 Than Ngo - 1.4-5 +- cleanup specfile +- upload the tarball + +* Thu Jun 2 2016 michel normand 1.4-4 +- Update v1.4 + * New API function cxl_get_psl_timebase_synced. + * Simplify implementation of OUT_OF_RANGE macro + * libcxl add install target + * use LDFLAGS from the env + * libcxl set default soname and interface version + * Add extern "C" to libcxl.h for compatibility with C++ projects + * typo error in 3 man pages + * Add SONAME support in Makefile +- remove embeded patches: + libcxl_typo_correction_man_pages.patch + libcxl_add_soname_in_Makefile.patch +- new libcxl_create_soname_link.patch + +* Thu Mar 17 2016 michel normand 1.3-4 +- do cp -p of man page in build section, and add empty lines below. +- this is the initial version before git commit. + +* Fri Mar 11 2016 michel normand 1.3-3 +- add libcxl.so in devel package + +* Thu Mar 03 2016 michel normand 1.3-2 +- do not use releease in VERS_LIB + +* Fri Jan 29 2016 michel normand 1.3-1 +- new package and spec file of libcxl from upstream + url: https://github.com/ibm-capi/libcxl diff --git a/libcxl_create_soname_link.patch b/libcxl_create_soname_link.patch new file mode 100644 index 0000000..32adbc4 --- /dev/null +++ b/libcxl_create_soname_link.patch @@ -0,0 +1,51 @@ +From 2568158ce6a37f506d50c08154e9411923c8dc59 Mon Sep 17 00:00:00 2001 +From: Frederic Bonnard +Date: Mon, 30 May 2016 17:55:58 +0200 +Subject: [PATCH] Create LIBSONAME link + +For the packaging, we should not only include the shared library itself, but +also the symbolic link which ldconfig would produce. (This is necessary, so +that the link gets removed by dpkg, for ex., automatically when the package gets +removed.) And the packaging doesn't have to deal with the soname version, so +putting this in the Makefile while waiting. +Also updating the all and clean targets. + +diff --git a/Makefile b/Makefile +index 5cfd873..b95c21f 100644 +--- a/Makefile ++++ b/Makefile +@@ -13,7 +13,7 @@ VERS_SONAME=1 + LIBSONAME = libcxl.so.$(VERS_SONAME) + SONAMEOPT = -Wl,-soname,$(LIBSONAME) + +-all: check_cxl_header $(LIBNAME) libcxl.so libcxl.a ++all: check_cxl_header $(LIBSONAME) libcxl.so libcxl.a + + HAS_WGET = $(shell /bin/which wget > /dev/null 2>&1 && echo y || echo n) + HAS_CURL = $(shell /bin/which curl > /dev/null 2>&1 && echo y || echo n) +@@ -39,6 +39,9 @@ libcxl.o libcxl_sysfs.o : CFLAGS += -fPIC + libcxl.so: $(LIBNAME) + ln -s $(LIBNAME) libcxl.so + ++$(LIBSONAME): $(LIBNAME) ++ ln -s $(LIBNAME) $(LIBSONAME) ++ + $(LIBNAME): libcxl.o libcxl_sysfs.o symver.map + $(call Q,CC, $(CC) $(CFLAGS) $(LDFLAGS) -shared libcxl.o libcxl_sysfs.o -o $(LIBNAME), $(LIBNAME)) -Wl,--version-script symver.map $(SONAMEOPT) + +@@ -48,13 +51,13 @@ libcxl.a: libcxl.o libcxl_sysfs.o + include Makefile.rules + + clean: +- rm -f *.o *.d libcxl.so libcxl.a include/misc/cxl.h ++ rm -f *.o *.d libcxl.so* libcxl.a include/misc/cxl.h + + install: all + mkdir -p $(DESTDIR)$(libdir) + mkdir -p $(DESTDIR)$(includedir) + install -m 0755 $(LIBNAME) $(DESTDIR)$(libdir)/ +- cp -d libcxl.so $(DESTDIR)$(libdir)/ ++ cp -d libcxl.so $(LIBSONAME) $(DESTDIR)$(libdir)/ + install -m 0644 libcxl.h $(DESTDIR)$(includedir)/ + + .PHONY: clean all install diff --git a/libcxl_sysmacros.patch b/libcxl_sysmacros.patch new file mode 100644 index 0000000..a6e9dc0 --- /dev/null +++ b/libcxl_sysmacros.patch @@ -0,0 +1,32 @@ +From: Michel Normand +Subject: libcxl sysmacros +Date: Thu, 08 Jun 2017 11:23:35 +0200 + +to avoid warning like: +=== +libcxl.c:250:13: warning: In the GNU C Library, "major" is defined + by . For historical compatibility, it is + currently defined by as well, but we plan to + remove this soon. To use "major", include + directly. If you did not intend to use a system-defined macro + "major", you should undefine it after including . + return asprintf(bufp, "/sys/dev/char/%i:%i", major(sb.st_rdev), +=== + +Signed-off-by: Michel Normand +--- + libcxl.c | 1 + + 1 file changed, 1 insertion(+) + +Index: libcxl-1.5/libcxl.c +=================================================================== +--- libcxl-1.5.orig/libcxl.c ++++ libcxl-1.5/libcxl.c +@@ -32,6 +32,7 @@ + #include + + #include ++#include + #include + #include + #include diff --git a/remove_2_backslashes_in_shell_call.patch b/remove_2_backslashes_in_shell_call.patch new file mode 100644 index 0000000..dab9efb --- /dev/null +++ b/remove_2_backslashes_in_shell_call.patch @@ -0,0 +1,28 @@ +From: Michel Normand +Subject: remove 2 backslashes in shell call +Date: Fri, 12 Jun 2020 17:26:40 +0200 + +Remove 2 backslashes in shell call + +To avoid make failure. +Seems to start failing in OBS hardware project +between 2020-04-05 and 2020-04-08 + +Signed-off-by: Michel Normand +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: libcxl-1.7/Makefile +=================================================================== +--- libcxl-1.7.orig/Makefile ++++ libcxl-1.7/Makefile +@@ -19,7 +19,7 @@ HAS_WGET = $(shell /bin/which wget > /de + HAS_CURL = $(shell /bin/which curl > /dev/null 2>&1 && echo y || echo n) + + # Update this to test a single feature from the most recent header we require: +-CHECK_CXL_HEADER_IS_UP_TO_DATE = $(shell /bin/echo -e \\\#include $(1)\\\nint i = CXL_START_WORK_TID\; | \ ++CHECK_CXL_HEADER_IS_UP_TO_DATE = $(shell /bin/echo -e \#include $(1)\\\nint i = CXL_START_WORK_TID\; | \ + $(CC) $(CFLAGS) -Werror -x c -S -o /dev/null - >/dev/null 2>&1 && echo y || echo n) + + check_cxl_header: diff --git a/sources b/sources new file mode 100644 index 0000000..c553ba3 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (v1.7.tar.gz) = 50aabb146b93ffb18702cb919828eb597b8fe49b5770a0f4ec0f52ed983a577247c4dc0aea4271618864e5fef8bd4aa41bfcd43c821ba55792517799bf0a32c9