Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
dbe672dc77
!3 增加关于软件包的使用说明
From: @polite2anyone 
Reviewed-by: @wk333 
Signed-off-by: @wk333
2024-01-16 03:03:35 +00:00
openeuler-ci-bot
dc154a461e
!11 [sync] PR-10: fix strip
From: @openeuler-sync-bot 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-08-28 08:06:17 +00:00
chen-jan
783c3d419c fix strip
(cherry picked from commit b86ba715d9b32bb35a54d485c457d322cf0b93e3)
2023-08-28 15:37:38 +08:00
openeuler-ci-bot
1acf680f3d
!8 Add pie options to fix ebs link error
From: @cherry530 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-07-13 08:07:04 +00:00
cherry530
a95d95120a fix link error
Signed-off-by: cherry530 <707078654@qq.com>
2023-07-13 15:34:49 +08:00
openeuler-ci-bot
5bde76ba0b
!6 pbzip2 在master进行升级,到1.1.13
From: @json-book 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-03-31 09:31:27 +00:00
json_book
fdfe69bd3d update version 1.1.13 2023-03-31 17:15:46 +08:00
polite2anyone
42fa267779 1.增加关于软件包的使用说明 2021-08-02 08:34:43 +08:00
openeuler-ci-bot
259b4bc5a0 !1 Package init
Merge pull request !1 from orange-snn/lwdev
2020-08-18 14:31:56 +08:00
liuwei
017dfe72e7 init 2020-01-14 09:35:46 +08:00
5 changed files with 155 additions and 44 deletions

View File

@ -0,0 +1,56 @@
--- pbzip2-1.1.13/pbzip2.cpp 2023-02-06 19:35:50.155958930 +0800
+++ pbzip2-1.1.13.new/pbzip2.cpp 2023-02-06 19:38:16.491958930 +0800
@@ -1220,7 +1220,7 @@
// give warning to user if block is larger than 250 million bytes
if (fileData->bufSize > 250000000)
{
- fprintf(stderr, "pbzip2: *WARNING: Compressed block size is large [%"PRIuMAX" bytes].\n",
+ fprintf(stderr, "pbzip2: *WARNING: Compressed block size is large [%" PRIuMAX " bytes].\n",
(uintmax_t) fileData->bufSize);
fprintf(stderr, " If program aborts, use regular BZIP2 to decompress.\n");
}
@@ -1829,7 +1829,7 @@
if (QuietMode != 1)
{
- fprintf(stderr, " Output Size: %"PRIuMAX" bytes\n", (uintmax_t)CompressedSize);
+ fprintf(stderr, " Output Size: %" PRIuMAX " bytes\n", (uintmax_t)CompressedSize);
}
#ifdef PBZIP_DEBUG
@@ -2072,7 +2072,7 @@
close(hOutfile);
if (QuietMode != 1)
{
- fprintf(stderr, " Output Size: %"PRIuMAX" bytes\n", (uintmax_t)CompressedSize);
+ fprintf(stderr, " Output Size: %" PRIuMAX " bytes\n", (uintmax_t)CompressedSize);
}
syncSetProducerDone(1); // Not really needed for direct version
@@ -2794,7 +2794,7 @@
// unlikely to get here since more likely exception will be thrown
if (OutputBuffer.size() != size)
{
- fprintf(stderr, "pbzip2: *ERROR: Could not initialize (OutputBuffer); size=%"PRIuMAX"! Aborting...\n", (uintmax_t)size);
+ fprintf(stderr, "pbzip2: *ERROR: Could not initialize (OutputBuffer); size=%" PRIuMAX "! Aborting...\n", (uintmax_t)size);
safe_mutex_unlock(OutMutex);
exit(1);
}
@@ -4102,7 +4102,7 @@
if (decompress == 1)
fprintf(stderr, " BWT Block Size: %c00k\n", BWTblockSizeChar);
if (hasInFile)
- fprintf(stderr, " Input Size: %"PRIuMAX" bytes\n", (uintmax_t)InFileSize);
+ fprintf(stderr, " Input Size: %" PRIuMAX " bytes\n", (uintmax_t)InFileSize);
}
if (decompress == 1)
@@ -4224,7 +4224,7 @@
{
NumBufferedBlocksMax = numCPU;
if (QuietMode != 1)
- fprintf(stderr, "*Warning* Max memory limit increased to %"PRIuMAX" MB to support %d CPUs\n", (uintmax_t)((NumBufferedBlocksMax + (numCPU * 2)) * blockSize)/1000000, numCPU);
+ fprintf(stderr, "*Warning* Max memory limit increased to %" PRIuMAX " MB to support %d CPUs\n", (uintmax_t)((NumBufferedBlocksMax + (numCPU * 2)) * blockSize)/1000000, numCPU);
}
else
{

View File

@ -1,36 +0,0 @@
# pbzip2
#### Description
Parallel implementation of bzip2
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -1,7 +1,11 @@
# pbzip2
#### 介绍
Parallel implementation of bzip2
pbzip2是基于bzip2发行的多线程版本压缩比与bzip2大致相同但压缩时间上比bzip2减少了线程倍数
这是因为bzip2是单线程工作而bpzip2是多线程的
pbzip2的输出压缩文件兼容bzip2 v1.0.2以及更新的版本pbzip2压缩的压缩包可用bzip2进行解压缩
#### 软件架构
软件架构说明
@ -9,15 +13,42 @@ Parallel implementation of bzip2
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
1.在欧拉操作系统下,可通过运行如下命令进行安装:
> dnf install pbzip2
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
````
Usage: pbzip2 [-1 .. -9] [-b#cdfhklm#p#qrS#tVz] <filename> <filename2> <filenameN>
-1 .. -9 set BWT block size to 100k .. 900k (default 900k)
-b# Block size in 100k steps (default 9 = 900k)
-c,--stdout Output to standard out (stdout)
-d,--decompress Decompress file
-f,--force Overwrite existing output file
-h,--help Print this help message
-k,--keep Keep input file, don't delete
-l,--loadavg Load average determines max number processors to use
-m# Maximum memory usage in 1MB steps (default 100 = 100MB)
-p# Number of processors to use (default: autodetect [1])
-q,--quiet Quiet mode (default)
-r,--read Read entire input file into RAM and split between processors
-S# Child thread stack size in 1KB steps (default stack size if unspecified)
-t,--test Test compressed file integrity
-v,--verbose Verbose mode
-V,--version Display version info for pbzip2 then exit
-z,--compress Compress file (default)
--ignore-trailing-garbage=# Ignore trailing garbage flag (1 - ignored; 0 - forbidden)
If no file names are given, pbzip2 compresses or decompresses from standard input to standard output.
Example: pbzip2 -b15vk myfile.tar
Example: pbzip2 -p4 -r -5 myfile.tar second*.txt
Example: tar cf myfile.tar.bz2 --use-compress-prog=pbzip2 dir_to_compress/
Example: pbzip2 -d -m500 myfile.tar.bz2
Example: pbzip2 -dc myfile.tar.bz2 | tar x
Example: pbzip2 -c < myfile.txt > myfile.txt.bz2
````
#### 参与贡献
@ -34,4 +65,4 @@ Parallel implementation of bzip2
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

BIN
pbzip2-1.1.13.tar.gz Normal file

Binary file not shown.

60
pbzip2.spec Normal file
View File

@ -0,0 +1,60 @@
%global debug_package %{nil}
Name: pbzip2
Version: 1.1.13
Release: 3
Summary: Parallel implementation of the bzip2 block-sorting file compressor
License: BSD
URL: http://www.compression.ca/pbzip2/
Source0: https://launchpad.net/pbzip2/1.1/1.1.13/+download/pbzip2-1.1.13.tar.gz
Patch0: 001-Fix-Invalid-Suffix_pbzip2.patch
BuildRequires: gcc-c++ bzip2-devel
%description
PBZIP2 is a parallel implementation of the bzip2 block-sorting file compressor.
The output of this version should be fully compatible with bzip2 v1.0.2 or newer
(ie: anything compressed with pbzip2 can be decompressed with bzip2).
%package_help
%prep
%autosetup -n pbzip2-%{version} -p1
f=AUTHORS; iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 && mv $f.utf8 $f && alias rpmbuild='rpmbuild --nodebuginfo'
%build
%set_build_flags
%make_build CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="%{__global_ldflags} -s -fpie -pie"
%install
pushd %{buildroot}
install -D -m755 %{_builddir}/pbzip2-%{version}/pbzip2 .%{_bindir}/pbzip2
install -D -m644 %{_builddir}/pbzip2-%{version}/pbzip2.1 .%{_mandir}/man1/pbzip2.1
ln -sf %{_builddir}/pbzip2-%{version}/pbzip2 .%{_bindir}/pbunzip2
ln -sf %{_builddir}/pbzip2-%{version}/pbzip2 .%{_bindir}/pbzcat
popd
%files
%defattr(-,root,root)
%doc AUTHORS README
%license COPYING
%{_bindir}/*
%files help
%defattr(-,root,root)
%doc ChangeLog
%{_mandir}/man1/*
%changelog
* Mon Aug 28 2023 chenchen <chen_aka_jan@163.com> - 1.1.13-3
- fix strip
* Thu Jul 13 2023 xu_ping <707078654@qq.com> - 1.1.13-2
- add pie options to fix link error
* Fri Feb 03 2023 wenchaofan <349464272@qq.com> - 1.1.13-1
- Update to 1.1.13
* Fri Jan 10 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.1.12-10
- Package init