Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
a4819fb8ed
!61 修复构建失败
From: @chenxi-mao 
Reviewed-by: @swf504 
Signed-off-by: @swf504
2023-04-13 01:07:42 +00:00
Chenxi Mao
fd6702ef6f Fix build error
error: Bad source: /home/abuild/rpmbuild/SOURCES/0007-Fix-build-error-if-compiler-is-clang.patch: No such file or directorym
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
2023-04-12 21:02:14 +08:00
openeuler-ci-bot
ae55a04e7b
!59 llvm平行宇宙计划:修复使用clang构建遇到的错误
From: @chenxi-mao 
Reviewed-by: @swf504, @liubo254 
Signed-off-by: @swf504
2023-04-12 10:02:19 +00:00
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
openeuler-ci-bot
75f0305eeb
!57 删除补丁2的架构隔离宏
From: @laokz 
Reviewed-by: @liubo254, @swf504 
Signed-off-by: @swf504
2023-03-22 01:23:41 +00:00
laokz
5dc18669c9 remove patch2 arch-protect macro
Signed-off-by: laokz <zhangkai@iscas.ac.cn>
2023-03-17 14:44:29 +08:00
openeuler-ci-bot
ffe117cbea
!54 移除补丁'skip testcase 23'
From: @handsome_brother 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2023-01-16 03:47:23 +00:00
lihaoxiang
641e9a0613 remove patch 'skip testcase 23'
Signed-off-by: lihaoxiang <lihaoxiang9@huawei.com>
2023-01-12 20:31:39 -05:00
openeuler-ci-bot
d77d25cb01
!50 移除不需要的兼容共享库
From: @chenxi-mao 
Reviewed-by: @liubo254, @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-12-12 03:27:43 +00:00
Chenxi Mao
6d6100a3e3 Remove useless shared library
Current RPM package includes two shared libraries,
the libaio.so.1.0.0 is a workaround file that is used to compatible
with old products.
Our product doesn't need this workaround, so remove it.

Reference: bsn#318
Change-Id: I60275dcff135ea7ddba6ffb3b03ff945889c4f63
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
2022-12-12 10:33:54 +08:00
4 changed files with 77 additions and 54 deletions

View File

@ -1,29 +0,0 @@
From 385c1b9eb28e1cc1f64ddedb4a64aa2effa13d5c Mon Sep 17 00:00:00 2001
From: wangzhiqiang <wangzhiqiang95@huawei.com>
Date: Thu, 3 Nov 2022 16:24:49 +0800
Subject: [PATCH] skip testcase 23 since current kernel version not support
current kernel version of obs not support run testcase 23,
so skip it to avoild build error.
issue: https://gitee.com/src-openeuler/libaio/issue/I5XELL
---
harness/runtests.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/harness/runtests.sh b/harness/runtests.sh
index e9ceec8..a62bae7 100755
--- a/harness/runtests.sh
+++ b/harness/runtests.sh
@@ -9,6 +9,9 @@ echo "Test run starting at" `date`
while [ $# -ge 1 ] ; do
this_test=$1
shift
+ if [ $this_test = "cases/23.p" ];then
+ continue
+ fi
echo "Starting $this_test"
$this_test 2>&1
res=$?
--
2.33.0

View File

@ -0,0 +1,56 @@
From 8c4d190b7a5ff484d4393d1d445a4245bda74c92 Mon Sep 17 00:00:00 2001
From: Chenxi Mao <chenxi.mao@suse.com>
Date: Wed, 5 Apr 2023 19:39:22 +0800
Subject: [PATCH 1/1] 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>
---
harness/Makefile | 2 ++
harness/cases/13.t | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/harness/Makefile b/harness/Makefile
index d7243a6..8d067eb 100644
--- a/harness/Makefile
+++ b/harness/Makefile
@@ -10,10 +10,12 @@ HARNESS_SRCS:=main.c
CFLAGS+=-Wall -Werror -I../src -g -O2
#-lpthread -lrt
+ifeq ($(CC),gcc)
# gcc-11 does not like the test case in 3.t that
# passes an invalid pointer (-1) to the kernel, so
# tell the compiler we do not need a warning here
cases/3.p: CFLAGS+=-Wno-stringop-overflow
+endif
# Change this on the build line to run tests against the installed libraries:
# make LIBAIO=-laio partcheck
diff --git a/harness/cases/13.t b/harness/cases/13.t
index 5f18005..9e82380 100644
--- a/harness/cases/13.t
+++ b/harness/cases/13.t
@@ -35,7 +35,7 @@ int test_main(void)
status |= attempt_io_submit(io_ctx, IOS, iocb_list, IOS);
for (i=0; i<IOS; i++) {
- struct timespec ts = { tv_sec: 30, tv_nsec: 0 };
+ struct timespec ts = { .tv_sec = 30, .tv_nsec = 0 };
struct io_event event;
struct iocb *iocb;
--
2.33.0

View File

@ -1,7 +1,7 @@
Name: libaio
Version: 0.3.113
Release: 4
Release: 9
Summary: Linux-native asynchronous I/O access library
License: LGPLv2+
URL: https://pagure.io/libaio
@ -9,14 +9,12 @@ 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
%ifarch aarch64 aarch64_ilp32 x86_64
Patch2: 0002-libaio-makefile-cflags.patch
%endif
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-skip-testcase-23-since-current-kernel-version-not-su.patch
Patch7: 0007-libaio-Add-sw64-architecture.patch
Patch6: 0006-libaio-Add-sw64-architecture.patch
Patch7: 0007-Fix-build-error-if-compiler-is-clang.patch
BuildRequires: gcc
@ -36,39 +34,22 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
Files for libaio development
%prep
%setup -q -a 0
%setup
%patch0 -p1 -b .install-to-destdir-slash-usr
%patch0 -p1 -b .install-to-destdir-slash-usr -d %{name}-%{version}
%patch1 -p1 -b .arm64-ilp32
%patch1 -p1 -b .arm64-ilp32 -d %{name}-%{version}
%ifarch aarch64 aarch64_ilp32 x86_64
%patch2 -p1 -b .makefile-cflags
%patch2 -p1 -b .makefile-cflags -d %{name}-%{version}
%endif
%patch3 -p1 -b .fix-x32
%patch3 -p1 -b .fix-x32 -d %{name}-%{version}
%patch4 -p1 -b .makefile-add-D_FORTIFY_SOURCE-flag
%patch4 -p1 -b .makefile-add-D_FORTIFY_SOURCE-flag -d %{name}-%{version}
%patch5 -p1 -b .fix-compile-error
%patch5 -p1 -b .fix-compile-error -d %{name}-%{version}
%patch6 -p1 -b .skip-testcase
%patch6 -p1 -b .skip-testcase -d %{name}-%{version}
%ifarch sw_64
%patch7 -p1
%patch7 -p1 -d %{name}-%{version}
%patch6 -p1
%endif
mv %{name}-%{version} setup-%{name}-%{version}
%patch7 -p1
%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
@ -88,6 +69,21 @@ make check
%attr(0755,root,root) %{_libdir}/libaio.so
%changelog
* Wed Apr 12 2023 Chenxi Mao <chenxi.mao@suse.com> - 0.3.113-9
- Fix build error because of incorrect patch file name.
* 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