commit 050e9d9b0f59c7a9e19b4a7d25174e06951784b5 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 10:54:47 2019 -0400 Package init diff --git a/0000-libaio-install-to-destdir-slash-usr.patch b/0000-libaio-install-to-destdir-slash-usr.patch new file mode 100644 index 0000000..aebc175 --- /dev/null +++ b/0000-libaio-install-to-destdir-slash-usr.patch @@ -0,0 +1,20 @@ +diff -up libaio-0.3.111/src/Makefile.orig libaio-0.3.111/src/Makefile +--- libaio-0.3.111/src/Makefile.orig 2018-03-06 17:24:47.000000000 -0500 ++++ libaio-0.3.111/src/Makefile 2018-03-07 10:44:49.148004447 -0500 +@@ -53,11 +53,11 @@ $(libname): $(libaio_sobjs) libaio.map + $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS) + + install: $(all_targets) +- install -D -m 644 libaio.h $(includedir)/libaio.h +- install -D -m 644 libaio.a $(libdir)/libaio.a +- install -D -m 755 $(libname) $(libdir)/$(libname) +- ln -sf $(libname) $(libdir)/$(soname) +- ln -sf $(libname) $(libdir)/libaio.so ++ install -D -m 644 libaio.h $(destdir)$(includedir)/libaio.h ++ install -D -m 644 libaio.a $(destdir)$(usrlibdir)/libaio.a ++ install -D -m 755 $(libname) $(destdir)$(usrlibdir)/$(libname) ++ ln -sf $(libname) $(destdir)$(usrlibdir)/$(soname) ++ ln -sf $(libname) $(destdir)$(usrlibdir)/libaio.so + + $(libaio_objs): libaio.h + diff --git a/9000-libaio-arm64-ilp32.patch b/9000-libaio-arm64-ilp32.patch new file mode 100644 index 0000000..401d053 --- /dev/null +++ b/9000-libaio-arm64-ilp32.patch @@ -0,0 +1,18 @@ +--- libaio-0.3.111_old/src/libaio.h 2019-01-26 10:54:53.202000000 +0800 ++++ libaio-0.3.111/src/libaio.h 2019-01-26 12:51:37.150000000 +0800 +@@ -53,6 +53,7 @@ + #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \ + defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \ + defined(__cris__) || (defined(__riscv) && __riscv_xlen == 32) || \ ++ (defined(__aarch64__) && defined(__ILP32__) && defined(__AARCH64EL__)) || \ + (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ + __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4) + #define PADDED(x, y) x; unsigned y +@@ -84,6 +85,7 @@ + (defined(__arm__) && defined(__ARMEB__)) || \ + defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \ + defined(__hppa__) || defined(__frv__) || defined(__avr32__) || \ ++ (defined(__aarch64__) && defined(__ILP32__) && defined(__AARCH64EB__)) || \ + (defined(__GNUC__) && defined(__BYTE_ORDER__) && \ + __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 4) + #define PADDED(x, y) unsigned y; x diff --git a/9001-libaio-makefile-cflags.patch b/9001-libaio-makefile-cflags.patch new file mode 100644 index 0000000..a0b0aa9 --- /dev/null +++ b/9001-libaio-makefile-cflags.patch @@ -0,0 +1,11 @@ +--- libaio-0.3.111_old/src/Makefile 2019-01-26 10:54:53.200000000 +0800 ++++ libaio-0.3.111/src/Makefile 2019-01-26 11:20:44.106000000 +0800 +@@ -3,7 +3,7 @@ + libdir=$(prefix)/lib + + CFLAGS ?= -g -fomit-frame-pointer -O2 +-CFLAGS += -nostdlib -nostartfiles -Wall -I. -fPIC ++CFLAGS += $(RPM_OPT_FLAGS) -nostdlib -nostartfiles -Wall -I. -fPIC + SO_CFLAGS=-shared $(CFLAGS) + L_CFLAGS=$(CFLAGS) + LINK_FLAGS= diff --git a/9002-destdir.patch b/9002-destdir.patch new file mode 100644 index 0000000..1f89e29 --- /dev/null +++ b/9002-destdir.patch @@ -0,0 +1,11 @@ +--- libaio-0.3.111_old/Makefile 2019-02-14 04:09:48.697926020 -0500 ++++ libaio-0.3.111/Makefile 2019-02-14 04:10:10.715926272 -0500 +@@ -14,7 +14,7 @@ + @$(MAKE) -C src + + install: +- @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir) ++ @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(includedir) libdir=$(libdir) + + check: + @$(MAKE) -C harness check diff --git a/9003-libaio-fix-for-x32.patch b/9003-libaio-fix-for-x32.patch new file mode 100644 index 0000000..152fabd --- /dev/null +++ b/9003-libaio-fix-for-x32.patch @@ -0,0 +1,18 @@ +--- libaio-0.3.111_old/src/syscall-x86_64.h 2019-02-14 04:09:48.632926019 -0500 ++++ libaio-0.3.111/src/syscall-x86_64.h 2019-02-14 04:14:05.585928959 -0500 +@@ -1,5 +1,15 @@ ++#ifndef __NR_io_setup + #define __NR_io_setup 206 ++#endif ++#ifndef __NR_io_destroy + #define __NR_io_destroy 207 ++#endif ++#ifndef __NR_io_getevents + #define __NR_io_getevents 208 ++#endif ++#ifndef __NR_io_submit + #define __NR_io_submit 209 ++#endif ++#ifndef __NR_io_cancel + #define __NR_io_cancel 210 ++#endif diff --git a/libaio-0.3.111.tar.gz b/libaio-0.3.111.tar.gz new file mode 100644 index 0000000..88c18e5 Binary files /dev/null and b/libaio-0.3.111.tar.gz differ diff --git a/libaio.spec b/libaio.spec new file mode 100644 index 0000000..6feff14 --- /dev/null +++ b/libaio.spec @@ -0,0 +1,109 @@ +Name: libaio +Version: 0.3.111 +Release: 4 +Summary: Linux-native asynchronous I/O access library +License: LGPLv2+ +URL: https://pagure.io/libaio +Source: http://releases.pagure.org/libaio/libaio-0.3.111.tar.gz + +Patch0000: 0000-libaio-install-to-destdir-slash-usr.patch + +Patch9000: 9000-libaio-arm64-ilp32.patch +%ifarch aarch64 aarch64_ilp32 +Patch9001: 9001-libaio-makefile-cflags.patch +%endif + +Patch9002: 9002-destdir.patch +Patch9003: 9003-libaio-fix-for-x32.patch + +BuildRequires: gcc + +%description +The Linux-native asynchronous I/O facility ("async I/O", or "aio") has a +richer API and capability set than the simple POSIX async I/O facility. +This library, libaio, provides the Linux-native API for async I/O. +The POSIX async I/O facility requires this library in order to provide +kernel-accelerated async I/O capabilities, as do applications which +require the Linux-native async I/O API. + +%package devel +Summary: Files for libaio development +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Files for libaio development + +%prep +%setup -q -a 0 +%patch0000 -p0 -b .install-to-destdir-slash-usr +%patch0000 -p1 -b .install-to-destdir-slash-usr + +%patch9000 -p0 -b .arm64-ilp32 +%patch9000 -p1 -b .arm64-ilp32 +%ifarch aarch64 aarch64_ilp32 +%patch9001 -p0 -b .makefile-cflags +%patch9001 -p1 -b .makefile-cflags +%endif +%patch9002 -p0 -b .makefile-destdir +%patch9002 -p1 -b .makefile-destdir +%patch9003 -p0 -b .fix-x32 +%patch9003 -p1 -b .fix-x32 + +mv %{name}-%{version} setup-%{name}-%{version} + +%build +make -C setup-%{name}-%{version} soname='libaio.so.1.0.0' libname='libaio.so.1.0.0' +make + +%install +pushd setup-%{name}-%{version} +install -D -m 755 src/libaio.so.1.0.0 \ + $RPM_BUILD_ROOT/%{_libdir}/libaio.so.1.0.0 +popd +make destdir=$RPM_BUILD_ROOT prefix=/ libdir=/%{_lib} usrlibdir=%{_libdir} \ + includedir=%{_includedir} install + +rm -rf %{buildroot}%{_usr}/%{_lib}/libaio.a + +%ldconfig_scriptlets + +%files +%license COPYING +%attr(0755,root,root) %{_libdir}/libaio.so.* + +%files devel +%attr(0644,root,root) %{_includedir}/* +%attr(0755,root,root) %{_libdir}/libaio.so + +%changelog +* Wed Sep 4 2019 sunshihao - 0.3.111-4 +- Type:enhancemnet +- ID:NA +- SUG:restart +- DESCi:openEuler Debranding. + +* Wed Aug 21 2019 wubo - 0.3.111-3.h4 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:change patch name + +* Tue Apr 2 2019 guyue 0.3.111-3.h3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:delete useless code + +* Thu Feb 14 2019 geruijun 0.3.111-3.h2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add backport patches + +* Sat Jan 26 2019 wangxiao 0.3.111-h1 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC: support ilp32 for aarch64 + +- Package Init