libaio/libaio.spec
Chenxi Mao 8ead6f86eb Fix build error if compiler is clang
There is a build error if compiler is clang:
clang -O2  -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS --config /usr/lib/rpm/generic-hardened-clang.cfg -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection  -Wall -Werror -I../src -g -O2 -Wno-stringop-overflow -DTEST_NAME=\"cases/3.t\" -o cases/3.p main.c ../src/libaio.a -lpthread
error: unknown warning option '-Wno-stringop-overflow'; did you mean '-Wno-shift-overflow'? [-Werror,-Wunknown-warning-option]

./cases/13.t:38:26: error: use of GNU old-style field designator extension [-Werror,-Wgnu-designator]
                 struct timespec ts = { tv_sec: 30, tv_nsec: 0 };
                                        ^~~~~~~
                                        .tv_sec =
./cases/13.t:38:38: error: use of GNU old-style field designator extension [-Werror,-Wgnu-designator]
                 struct timespec ts = { tv_sec: 30, tv_nsec: 0 };
                                                   ^~~~~~~~
                                                   .tv_nsec =
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
2023-04-12 15:39:52 +08:00

151 lines
4.1 KiB
RPMSpec

Name: libaio
Version: 0.3.113
Release: 8
Summary: Linux-native asynchronous I/O access library
License: LGPLv2+
URL: https://pagure.io/libaio
Source: https://releases.pagure.org/libaio/libaio-%{version}.tar.gz
Patch0: 0000-libaio-install-to-destdir-slash-usr.patch
Patch1: 0001-libaio-arm64-ilp32.patch
Patch2: 0002-libaio-makefile-cflags.patch
Patch3: 0003-libaio-fix-for-x32.patch
Patch4: 0004-libaio-makefile-add-D_FORTIFY_SOURCE-flag.patch
Patch5: 0005-Fix-compile-error-that-exec-checking-need-super-priv.patch
Patch6: 0006-libaio-Add-sw64-architecture.patch
Patch7: 0007-Fix-build-error-if-compiler-is-clang.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
%patch0 -p1 -b .install-to-destdir-slash-usr
%patch1 -p1 -b .arm64-ilp32
%patch2 -p1 -b .makefile-cflags
%patch3 -p1 -b .fix-x32
%patch4 -p1 -b .makefile-add-D_FORTIFY_SOURCE-flag
%patch5 -p1 -b .fix-compile-error
%ifarch sw_64
%patch6 -p1
%endif
%patch7 -p1
%build
make
%install
make destdir=$RPM_BUILD_ROOT prefix=/ libdir=/%{_lib} usrlibdir=%{_libdir} \
includedir=%{_includedir} install
rm -rf %{buildroot}%{_usr}/%{_lib}/libaio.a
%ldconfig_scriptlets
%check
make check
%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 Apr 05 2023 Chenxi Mao <chenxi.mao@suse.com> - 0.3.113-8
- Fix build error if compiler is clang.
* Fri Mar 17 2023 laokz <zhangkai@iscas.ac.cn> - 0.3.113-7
- remove patch2 arch-protection macro
* Wed Jan 11 2023 lihaoxiang <lihaoxiang9@huawei.com> - 0.3.113-6
- remove patch 'skip testcase 23'
* Thu Dec 8 2022 Chenxi Mao<chenxi.mao@suse.com> - 0.3.113-5
- Remove useless shared library
* Fri Dec 2 2022 liubo<liubo254@huawei.com> - 0.3.113-4
- Sync patches to setup-libaio-%{version}-%{version} package
* Mon Nov 7 2022 wuzx<wuzx1226@qq.com> - 0.3.113-3
- Add sw64 architecture
* Thu Nov 3 2022 wangzhiqiang <wangzhiqiang95@huawei.com> - 0.3.113-2
- skip testcase 23 since current kernel version not support
* Fri Oct 28 2022 wangzhiqiang <wangzhiqiang95@huawei.com> - 0.3.113-1
- update from 0.3.112 to 0.3.113
* Fri Jun 24 2022 lihaoxiang <lihaoxiang9@huawei.com> - 0.3.112-5
- fix compile error
* Thu May 12 2022 Li Jinlin <lijinlin3@huawei.com> - 0.3.112-4
- fix patch4 not apply
* Wed Dec 1 2021 volcanodragon <linfeilong@huawei.com> - 0.3.112-3
- add D_FORTIFY_SOURCE flag to Makefile for security
* Sun Sep 26 2021 Li Jinlin <lijinlin3@huawei.com> - 0.3.112-2
- enable %check option
* Sat Jul 18 2020 volcanodragon <linfeilong@huawei.com> - 0.3.112-1
- update from 0.3.111 to 0.3.112
* Wed Jul 1 2020 Wu Bo <wubo009@163.com> - 0.3.111-6
- rebuild package
* Tue Mar 17 2020 hy-euler <eulerstoragemt@huawei.com> - 0.3.111-5
- Type:enhancemnet
- ID:NA
- SUG:restart
- DESC:Add secure compilation options for x86_64.
* Wed Sep 4 2019 sunshihao<sunshihao@huawei.com> - 0.3.111-4
- Type:enhancemnet
- ID:NA
- SUG:restart
- DESC:openEuler Debranding.
* Wed Aug 21 2019 wubo <wubo40@huawei.com> - 0.3.111-3.h4
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:change patch name
* Tue Apr 2 2019 guyue <guyue7@huawei.com> 0.3.111-3.h3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:delete useless code
* Thu Feb 14 2019 geruijun <geruijun@huawei.com> 0.3.111-3.h2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add backport patches
* Sat Jan 26 2019 wangxiao <wangxiao65@huawei.com> 0.3.111-h1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC: support ilp32 for aarch64
- Package Init