Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
bb482d2fe0
!29 【轻量级PR】修正changelog中的错误日期
From: @konglidong 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2022-05-30 09:13:40 +00:00
konglidong
b09acb35ed modify bad date in %changelog 2022-05-27 15:31:13 +08:00
openeuler-ci-bot
69095e0cd3 !19 去掉安装依赖unzip
From: @tong_1001
Reviewed-by: @overweight
Signed-off-by: @overweight
2021-08-04 02:36:57 +00:00
shixuantong
d964049828 remove unnecessary installation dependencies 2021-08-03 16:24:48 +08:00
openeuler-ci-bot
0f73ea8d3e !18 revert zip-3.0-crc-builtin.patch
From: @tong_1001
Reviewed-by: @xiezhipeng1
Signed-off-by: @xiezhipeng1
2021-06-21 02:57:03 +00:00
tong_1001
fb50d60edd revertzip-3.0-crc-builtin.patch 2021-06-21 10:48:17 +08:00
openeuler-ci-bot
4bbb170d43 !11 add openeuler-zip-3.0-crc-builtin.patch
From: @hanzhelii
Reviewed-by: 
Signed-off-by:
2021-05-20 09:13:41 +08:00
hanzhelii
f72bf32f61 update zip-3.0-crc-builtin.patch.
add message of commit
2021-05-17 19:12:53 +08:00
hanzhelii
d10fa156ed add openeuler-zip-3.0-crc-builtin.patch
reason: this patch is created for performance optimization in crc calculation only  suitable for openeuler of aarch64 architecture。
you can patch it to the source code of zip software package and install the zip software as usual。
effect: with this patch, the zip software can speed up nearly 20% when running than before。
2021-05-17 17:57:41 +08:00
hanzhelii
f2ae64ca74 删除文件 zip-3.0-crc-builtin.patch 2021-05-17 17:02:11 +08:00
2 changed files with 12 additions and 105 deletions

View File

@ -1,99 +0,0 @@
diff -Nabur zip30/crc32.c zip304/crc32.c
--- zip30/crc32.c 2008-05-05 00:51:40.000000000 +0800
+++ zip304/crc32.c 2021-05-11 19:15:43.071275962 +0800
@@ -675,7 +675,32 @@
#endif /* (IZ_CRC_BE_OPTIMIZ || IZ_CRC_LE_OPTIMIZ) */
+#ifdef ARCH_AARCH64
+u_int32_t crc32(u_int32_t crc,const u_int8_t *p, unsigned int len)
+{
+int64_t length = len;
+
+while ((length -= sizeof(u_int64_t)) >=0) {
+ __builtin_aarch64_crc32cx(crc, *((u_int64_t *)p));
+ p += sizeof(u_int64_t);
+}
+
+if (length & sizeof(u_int32_t)) {
+ __builtin_aarch64_crc32cw(crc, *((u_int32_t *)p));
+ p += sizeof(u_int32_t);
+}
+if (length & sizeof(u_int16_t)) {
+ __builtin_aarch64_crc32ch(crc, *((u_int16_t *)p));
+ p += sizeof(u_int16_t);
+}
+
+if (length & sizeof(u_int8_t))
+ __builtin_aarch64_crc32cb(crc, *p);
+
+return crc;
+}
+#else
/* ========================================================================= */
ulg crc32(crc, buf, len)
ulg crc; /* crc shift register */
@@ -726,6 +751,8 @@
return REV_BE(c) ^ 0xffffffffL; /* (instead of ~c for 64-bit machines) */
}
+#endif /* !ARCH_AARCH64*/
+
#endif /* !ASM_CRC */
#endif /* !CRC_TABLE_ONLY */
#endif /* !USE_ZLIB */
diff -Nabur zip30/crc32.h zip304/crc32.h
--- zip30/crc32.h 2008-03-28 20:25:46.000000000 +0800
+++ zip304/crc32.h 2021-05-11 19:17:36.765057779 +0800
@@ -36,7 +36,11 @@
# undef IZ_CRC_BE_OPTIMIZ
# endif
#else /* !(USE_ZLIB || CRC_TABLE_ONLY) */
+# ifdef ARCH_AARCH64
+ u_int32_t crc32(u_int32_t crc,const u_int8_t *p, unsigned int len);
+# else
ulg crc32 OF((ulg crc, ZCONST uch *buf, extent len));
+# endif
#endif /* ?(USE_ZLIB || CRC_TABLE_ONLY) */
#ifndef CRC_32_TAB
diff -Nabur zip30/unix/Makefile zip304/unix/Makefile
--- zip30/unix/Makefile 2008-05-07 14:33:56.000000000 +0800
+++ zip304/unix/Makefile 2021-05-11 19:15:55.727474311 +0800
@@ -37,6 +37,9 @@
BINFLAGS = 755
MANFLAGS = 644
+
+TARGET_ARCH = $(shell uname -m)
+ARCH = $(shell getconf LONG_BIT)
# target directories - where to install executables and man pages to
prefix = /usr/local
BINDIR = $(prefix)/bin
@@ -59,6 +62,12 @@
# LFLAGS2 flags after obj file list (libraries, etc)
CFLAGS_NOOPT = -I. -DUNIX $(LOCAL_ZIP)
CFLAGS = -O2 $(CFLAGS_NOOPT)
+ifeq ($(TARGET_ARCH),aarch64)
+CFF = -DARCH=$(ARCH) -march=armv8.1-a -D ARCH_AARCH64
+else
+CFF =
+endif
+
LFLAGS1 =
LFLAGS2 = -s
@@ -80,10 +89,10 @@
.SUFFIXES:
.SUFFIXES: _.o .o .c .doc .1
.c_.o:
- $(CC) -c $(CFLAGS) -DUTIL -o $@ $<
+ $(CC) -c $(CFLAGS) -DUTIL $(CFF) -o $@ $<
.c.o:
- $(CC) -c $(CFLAGS) $<
+ $(CC) -c $(CFLAGS) $(CFF) $<
.1.doc:
nroff -man $< | col -bx | uniq > $@

View File

@ -1,6 +1,6 @@
Name: zip
Version: 3.0
Release: 27
Release: 30
Summary: A compression and file packaging/archive utility
License: Info-ZIP
URL: http://www.info-zip.org/Zip.html
@ -18,10 +18,7 @@ Patch6000: CVE-2018-13410.patch
Patch9000: openEuler-Cleanup-residual-temporary-file.patch
Patch12000: zip-3.0-crc-builtin.patch
BuildRequires: bzip2-devel gcc
Requires: unzip
%description
The zip program is a compression and file packaging utility. Zip has one
@ -58,10 +55,19 @@ mkdir -p %{buildroot}%{_mandir}/man1
%{_mandir}/man1/zip*
%changelog
* May Sun 9 2021 hanzhelii <182212254@bjtu.edu.cn> - 3.0-27
* Fri May 27 2022 konglidong <konglidong@uniontech.com> - 3.0-30
- modify bad date in %changelog
* Tue Aug 03 2021 shixuantong <shixuantong@huawei.com> - 3.0-29
- remove unnecessary installation dependencies
* Mon Jun 21 2021 shixuantong <shixuantong@huawei.com> - 3.0-28
- revert zip-3.0-crc-builtin.patch
* Sun May 9 2021 hanzhelii <182212254@bjtu.edu.cn> - 3.0-27
- Add zip-3.0-crc-builtin.patch
* Dec Thu 8 2020 wuchaochao <wuchaochao4@huawei.com> - 3.0-26
* Tue Dec 8 2020 wuchaochao <wuchaochao4@huawei.com> - 3.0-26
- Add openEuler-Cleanup-residual-temporary-file.patch
* Fri Feb 14 2020 chengquan <chengquan3@huawei.com> - 3.0-25