Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
5edcb35591
!25 [sync] PR-23: [sync] PR-21: Cleanup spec
From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2025-02-14 09:36:18 +00:00
Funda Wang
bac409748a cleanup spec
(cherry picked from commit c4b4a4b55c15ee9d6f66572303c228334066a35c)
(cherry picked from commit 7c265be9472dc6d9a857812a66c2f48cef095835)
2025-02-12 10:55:22 +08:00
openeuler-ci-bot
5ce611280a
!19 [sync] PR-18: 修复bunzip2 -L/-V和bzcat -L/-V查询信息打印异常且返回值不为0
From: @openeuler-sync-bot 
Reviewed-by: @znzjugod 
Signed-off-by: @znzjugod
2024-04-22 06:31:14 +00:00
zhoupengcheng
8197dea5ed 修复bunzip2 -L/-V和bzcat -L/-V查询信息打印异常且返回值不为0
(cherry picked from commit de601d9f5ea29e3a252508b41e7f9753c499f3e2)
2024-04-19 17:34:36 +08:00
openeuler-ci-bot
69c2fe406f
!13 llvm平行宇宙计划:支持使用clang构建bzip2
From: @chenxi-mao 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
2023-04-18 01:14:05 +00:00
Chenxi Mao
ee1d2a43be Support build with clang
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
2023-04-13 21:34:21 +08:00
openeuler-ci-bot
4f3539349c
!6 Delete redundant .so files
From: @zhoupengcheng11 
Reviewed-by: @lvying6 
Signed-off-by: @lvying6
2022-09-20 06:22:16 +00:00
ZhouPengcheng
b76cdb52a9
Delete redundant .so files
Signed-off-by: ZhouPengcheng <zhoupengcheng11@huawei.com>
2022-09-20 04:27:27 +00:00
openeuler-ci-bot
3959fd5836 !4 remove buildrequires gdb
From: @wcc_140409
Reviewed-by: @overweight
Signed-off-by: @overweight
2021-07-22 13:28:42 +00:00
19909236985
9ebfb7929e remove gdb 2021-07-22 17:11:34 +08:00
3 changed files with 116 additions and 22 deletions

View File

@ -0,0 +1,48 @@
From 65179284ceddc43e6388bf4ed8c2d85cf16e1b2f Mon Sep 17 00:00:00 2001
From: Rikard Gynnerstedt <rikard.gynnerstedt@gmail.com>
Date: Thu, 24 Oct 2019 12:48:57 +0200
Subject: [PATCH] license and version print should output to stdout and exit
with code 0
Reference: https://gitlab.com/bzip2/bzip2/-/commit/65179284ceddc43e6388bf4ed8c2d85cf16e1b2f
Conflict: NA
---
bzip2.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/bzip2.c b/bzip2.c
index ed1a33f..6da2905 100644
--- a/bzip2.c
+++ b/bzip2.c
@@ -1600,7 +1600,7 @@ void testf ( Char *name )
static
void license ( void )
{
- fprintf ( stderr,
+ fprintf ( stdout,
"bzip2, a block-sorting file compressor. "
"Version %s.\n"
@@ -1890,7 +1890,9 @@ IntNative main ( IntNative argc, Char *argv[] )
case '8': blockSize100k = 8; break;
case '9': blockSize100k = 9; break;
case 'V':
- case 'L': license(); break;
+ case 'L': license();
+ exit ( 0 );
+ break;
case 'v': verbosity++; break;
case 'h': usage ( progName );
exit ( 0 );
@@ -1916,8 +1918,8 @@ IntNative main ( IntNative argc, Char *argv[] )
if (ISFLAG("--keep")) keepInputFiles = True; else
if (ISFLAG("--small")) smallMode = True; else
if (ISFLAG("--quiet")) noisy = False; else
- if (ISFLAG("--version")) license(); else
- if (ISFLAG("--license")) license(); else
+ if (ISFLAG("--version")) { license(); exit ( 0 ); } else
+ if (ISFLAG("--license")) { license(); exit ( 0 ); } else
if (ISFLAG("--exponential")) workFactor = 1; else
if (ISFLAG("--repetitive-best")) redundant(aa->name); else
if (ISFLAG("--repetitive-fast")) redundant(aa->name); else
--
GitLab

View File

@ -0,0 +1,26 @@
--- bzip2-1.0.8/Makefile.orig 2024-08-11 20:50:17.297655600 +0800
+++ bzip2-1.0.8/Makefile 2024-08-11 20:51:08.955480100 +0800
@@ -15,9 +15,9 @@
SHELL=/bin/sh
# To assist in cross-compiling
-CC=gcc
-AR=ar
-RANLIB=ranlib
+CC ?=gcc
+AR ?= ar
+RANLIB ?= ranlib
# Where you want it installed when you do 'make install'
PREFIX=/usr/local
--- bzip2-1.0.8/Makefile-libbz2_so.orig 2024-08-11 20:56:12.124391600 +0800
+++ bzip2-1.0.8/Makefile-libbz2_so 2024-08-11 20:57:53.109240100 +0800
@@ -22,7 +22,7 @@
SHELL=/bin/sh
-CC=gcc
+CC ?= gcc
BIGFILES=-D_FILE_OFFSET_BITS=64
OBJS= blocksort.o \

View File

@ -1,20 +1,22 @@
Name: bzip2 Name: bzip2
Version: 1.0.8 Version: 1.0.8
Release: 3 Release: 8
Summary: A high-quality data compressor Summary: A high-quality data compressor
License: BSD License: BSD-4-Clause
URL: https://www.sourceware.org/bzip2/ URL: https://www.sourceware.org/bzip2/
Source0: https://sourceware.org/pub/bzip2/%{name}-%{version}.tar.gz Source0: https://sourceware.org/pub/bzip2/%{name}-%{version}.tar.gz
Source1: bzip2.pc Source1: bzip2.pc
Patch0: 0001-add-compile-option.patch Patch0: 0001-add-compile-option.patch
Patch1: 0002-CVE-2019-12900.patch Patch1: 0002-CVE-2019-12900.patch
Patch2: 0003-license-and-version-print-should-output-to-stdout-and-exit-with-code-0.patch
Patch3: bzip2-1.0.8-toolchain-variable.patch
BuildRequires: gcc gdb BuildRequires: gcc
Provides: bzip2-libs Provides: bzip2-libs = %{version}-%{release}
Obsoletes: bzip2-libs Obsoletes: bzip2-libs < %{version}-%{release}
%description %description
bzip2 is a freely available, patent free, high-quality data compressor. bzip2 is a freely available, patent free, high-quality data compressor.
@ -25,8 +27,8 @@ around twice as fast at compression and six times faster at decompression.
%package devel %package devel
Summary: header files for bzip2 Summary: header files for bzip2
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Provides: bzip2-static Provides: bzip2-static = %{version}-%{release}
Obsoletes: bzip2-static Obsoletes: bzip2-static < %{version}-%{release}
%description devel %description devel
header files for bzip2 header files for bzip2
@ -37,11 +39,17 @@ header files for bzip2
%autosetup -n %{name}-%{version} -p1 %autosetup -n %{name}-%{version} -p1
%build %build
%make_build -f Makefile-libbz2_so "CFLAGS=%{optflags} -Winline -fpic -fPIC -D_FILE_OFFSET_BITS=64" %if "%toolchain" == "clang"
%make_build "CFLAGS=%{optflags} -fpic -fPIC -Winline -D_FILE_OFFSET_BITS=64" export CC=clang
export AR=llvm-ar
export RANLIB=llvm-ranlib
%endif
export CFLAGS="%{build_cflags} -Winline -fpic -fPIC -D_FILE_OFFSET_BITS=64"
%set_build_flags
%make_build -f Makefile-libbz2_so
%make_build
%install %install
rm -rf %RPM_BUILD_ROOT
%make_install PREFIX=%{buildroot}%{_prefix} %make_install PREFIX=%{buildroot}%{_prefix}
# Default install path is /usr/bin lib man, change dest dirs here. # Default install path is /usr/bin lib man, change dest dirs here.
@ -55,31 +63,27 @@ ln -fs bzdiff %{buildroot}%{_bindir}/bzcmp
ln -fs bzgrep %{buildroot}%{_bindir}/bzegrep ln -fs bzgrep %{buildroot}%{_bindir}/bzegrep
ln -fs bzgrep %{buildroot}%{_bindir}/bzfgrep ln -fs bzgrep %{buildroot}%{_bindir}/bzfgrep
ln -fs bzmore %{buildroot}%{_bindir}/bzless ln -fs bzmore %{buildroot}%{_bindir}/bzless
install -m 0755 *.so* %{buildroot}%{_libdir} install -m 0755 libbz2.so.%{version} %{buildroot}%{_libdir}
ln -s libbz2.so.%{version} %{buildroot}%{_libdir}/libbz2.so.1 ln -s libbz2.so.%{version} %{buildroot}%{_libdir}/libbz2.so.1
ln -s libbz2.so.1 %{buildroot}%{_libdir}/libbz2.so ln -s libbz2.so.1 %{buildroot}%{_libdir}/libbz2.so
cp %{SOURCE1} . cp %{S:1} .
sed -i "s@^libdir=@libdir=%{_libdir}@" bzip2.pc sed -i "s@^libdir=@libdir=%{_libdir}@" bzip2.pc
mkdir -p %{buildroot}%{_libdir}/pkgconfig mkdir -p %{buildroot}%{_libdir}/pkgconfig
install -m 0644 bzip2.pc %{buildroot}%{_libdir}/pkgconfig/ install -m 0644 bzip2.pc %{buildroot}%{_libdir}/pkgconfig/
ln -s bzip2.1.gz %{buildroot}%{_mandir}/man1/bunzip2.1.gz ln -s bzip2.1 %{buildroot}%{_mandir}/man1/bunzip2.1
ln -s bzip2.1.gz %{buildroot}%{_mandir}/man1/bzcat.1.gz ln -s bzip2.1 %{buildroot}%{_mandir}/man1/bzcat.1
ln -s bzip2.1.gz %{buildroot}%{_mandir}/man1/bzip2recover.1.gz ln -s bzip2.1 %{buildroot}%{_mandir}/man1/bzip2recover.1
%check %check
make check %make_build check
%ldconfig_scriptlets
%files %files
%defattr(-,root,root) %doc CHANGES README
%doc CHANGES LICENSE README
%license LICENSE %license LICENSE
%{_bindir}/* %{_bindir}/*
%{_libdir}/*.so.* %{_libdir}/*.so.*
%files devel %files devel
%defattr(-,root,root)
%{_includedir}/bzlib.h %{_includedir}/bzlib.h
%{_libdir}/*.so %{_libdir}/*.so
%{_libdir}/pkgconfig/ %{_libdir}/pkgconfig/
@ -87,9 +91,25 @@ make check
%files help %files help
%doc manual.html manual.pdf %doc manual.html manual.pdf
%{_mandir}/man1/b*.1.gz %{_mandir}/man1/*
%changelog %changelog
* Sun Aug 11 2024 Funda Wang <fundawang@yeah.net> - 1.0.8-8
- cleanup spec
- merge clang and gcc declaration
* Fri Apr 19 2024 zhoupengcheng <zhoupengcheng11@huawei.com> - 1.0.8-7
- license and version print should output to stdout and exit with code
* Thu Apr 13 2023 Chenxi Mao <chenxi.mao@suse.com> - 1.0.8-6
- Support build with clang.
* Tue Sep 20 2022 zhoupengcheng <zhoupengcheng11@huawei.com> - 1.0.8-5
- Delete redundant .so files
* Thu Jul 22 2021 wuchaochao <wuchaochao4@huawei.com> - 1.0.8-4
- Remove BuildRequires gdb
* Sat Mar 21 2020 chengquan<chengquan3@huawei.com> - 1.0.8-3 * Sat Mar 21 2020 chengquan<chengquan3@huawei.com> - 1.0.8-3
- Add fPIC option to make the self-compiled environment build normally - Add fPIC option to make the self-compiled environment build normally