diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b80d753 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/liburing-0.2.tar.bz2 diff --git a/.liburing.metadata b/.liburing.metadata new file mode 100644 index 0000000..53a2c38 --- /dev/null +++ b/.liburing.metadata @@ -0,0 +1 @@ +13b826f8eecbcd5d11b06b013b10c9ce74ddb4ed SOURCES/liburing-0.2.tar.bz2 diff --git a/SOURCES/liburing-Makefile-add-missing-pc-dependency-on-spec-file.patch b/SOURCES/liburing-Makefile-add-missing-pc-dependency-on-spec-file.patch new file mode 100644 index 0000000..da4ab82 --- /dev/null +++ b/SOURCES/liburing-Makefile-add-missing-pc-dependency-on-spec-file.patch @@ -0,0 +1,26 @@ +Subject: [PATCH liburing v3 2/3] Makefile: add missing .pc dependency on .spec file + +The version number is extracted from the .spec file. Make .pc depend on +.spec so that VERSION variable substitutions are always up-to-date. + +Signed-off-by: Stefan Hajnoczi +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index cc457bb..8af1c3a 100644 +--- a/Makefile ++++ b/Makefile +@@ -31,7 +31,7 @@ ifneq ($(MAKECMDGOALS),clean) + include config-host.mak + endif + +-%.pc: %.pc.in config-host.mak ++%.pc: %.pc.in config-host.mak $(SPECFILE) + sed -e "s%@prefix@%$(prefix)%g" \ + -e "s%@libdir@%$(libdir)%g" \ + -e "s%@includedir@%$(includedir)%g" \ +-- +2.23.0 + diff --git a/SOURCES/liburing-add-missing-generic-implementation-of-smp_mb.patch b/SOURCES/liburing-add-missing-generic-implementation-of-smp_mb.patch new file mode 100644 index 0000000..f0de7dd --- /dev/null +++ b/SOURCES/liburing-add-missing-generic-implementation-of-smp_mb.patch @@ -0,0 +1,12 @@ +diff --git a/src/include/liburing/barrier.h b/src/include/liburing/barrier.h +index fc40a8a..aca308a 100644 +--- a/src/include/liburing/barrier.h ++++ b/src/include/liburing/barrier.h +@@ -76,6 +76,7 @@ do { \ + * Add arch appropriate definitions. Be safe and use full barriers for + * archs we don't have support for. + */ ++#define io_uring_smp_mb() __sync_synchronize() + #define io_uring_smp_rmb() __sync_synchronize() + #define io_uring_smp_wmb() __sync_synchronize() + #endif /* defined(__x86_64__) || defined(__i386__) */ diff --git a/SOURCES/liburing-spec-update-RPM-version-number-to-0.2.patch b/SOURCES/liburing-spec-update-RPM-version-number-to-0.2.patch new file mode 100644 index 0000000..b40deb3 --- /dev/null +++ b/SOURCES/liburing-spec-update-RPM-version-number-to-0.2.patch @@ -0,0 +1,21 @@ +Subject: [PATCH liburing v3 1/3] spec: update RPM version number to 0.2 + +Signed-off-by: Stefan Hajnoczi +--- + liburing.spec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/liburing.spec b/liburing.spec +index 1337034..f9e9262 100644 +--- a/liburing.spec ++++ b/liburing.spec +@@ -1,5 +1,5 @@ + Name: liburing +-Version: 0.1 ++Version: 0.2 + Release: 1 + Summary: Linux-native io_uring I/O access library + License: LGPLv2+ +-- +2.23.0 + diff --git a/SPECS/liburing.spec b/SPECS/liburing.spec new file mode 100644 index 0000000..d048738 --- /dev/null +++ b/SPECS/liburing.spec @@ -0,0 +1,59 @@ +Name: liburing +Version: 0.2 +Release: 2%{?dist} +Summary: Linux-native io_uring I/O access library +License: LGPLv2+ +Source: %{name}-%{version}.tar.bz2 +URL: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2 +BuildRequires: gcc +Patch0: liburing-spec-update-RPM-version-number-to-0.2.patch +Patch1: liburing-Makefile-add-missing-pc-dependency-on-spec-file.patch +Patch2: liburing-add-missing-generic-implementation-of-smp_mb.patch + +%description +Provides native async IO for the Linux kernel, in a fast and efficient +manner, for both buffered and O_DIRECT. + +%package devel +Summary: Development files for Linux-native io_uring I/O access library +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig + +%description devel +This package provides header files to include and libraries to link with +for the Linux-native io_uring. + +%prep +%autosetup -p1 + +%build +./configure --prefix=%{_prefix} --libdir=/%{_libdir} --mandir=%{_mandir} --includedir=%{_includedir} + +%make_build + +%install +%make_install + +%files +%attr(0755,root,root) %{_libdir}/liburing.so.* +%doc COPYING + +%files devel +%{_includedir}/liburing/ +%{_includedir}/liburing.h +%{_libdir}/liburing.so +%{_libdir}/liburing.a +%{_libdir}/pkgconfig/* +%{_mandir}/man2/* + +%changelog +* Wed Nov 6 2019 Jeff Moyer - 0.2-2.el8 +- bump release to trigger gating tests +- Related: bz#1724804 + +* Thu Oct 31 2019 Jeff Moyer - 0.2-1 +- Initial rhel8 package. +- Resolves: bz#1724804 + +* Tue Jan 8 2019 Jens Axboe - 0.1 +- Initial version